Home
/
API
/
Schemas

Schemas

Schemas

agentsdk.AWSInstanceIdentityToken

{
  "document": "string",
  "signature": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
documentstringtrue
signaturestringtrue

agentsdk.AgentMetric

{
  "labels": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "name": "string",
  "type": "counter",
  "value": 0
}

Properties

NameTypeRequiredRestrictionsDescription
labelsarray of agentsdk.AgentMetricLabelfalse
namestringtrue
typeagentsdk.AgentMetricTypetrue
valuenumbertrue

Enumerated Values

PropertyValue
typecounter
typegauge

agentsdk.AgentMetricLabel

{
  "name": "string",
  "value": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
namestringtrue
valuestringtrue

agentsdk.AgentMetricType

"counter"

Properties

Enumerated Values

Value
counter
gauge

agentsdk.AuthenticateResponse

{
  "session_token": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
session_tokenstringfalse

agentsdk.AzureInstanceIdentityToken

{
  "encoding": "string",
  "signature": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
encodingstringtrue
signaturestringtrue

agentsdk.GitAuthResponse

{
  "password": "string",
  "url": "string",
  "username": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
passwordstringfalse
urlstringfalse
usernamestringfalse

agentsdk.GitSSHKey

{
  "private_key": "string",
  "public_key": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
private_keystringfalse
public_keystringfalse

agentsdk.GoogleInstanceIdentityToken

{
  "json_web_token": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
json_web_tokenstringtrue

agentsdk.Manifest

{
  "apps": [
    {
      "command": "string",
      "display_name": "string",
      "external": true,
      "health": "disabled",
      "healthcheck": {
        "interval": 0,
        "threshold": 0,
        "url": "string"
      },
      "icon": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "sharing_level": "owner",
      "slug": "string",
      "subdomain": true,
      "url": "string"
    }
  ],
  "derpmap": {
    "omitDefaultRegions": true,
    "regions": {
      "property1": {
        "avoid": true,
        "embeddedRelay": true,
        "nodes": [
          {
            "certName": "string",
            "derpport": 0,
            "forceHTTP": true,
            "hostName": "string",
            "insecureForTests": true,
            "ipv4": "string",
            "ipv6": "string",
            "name": "string",
            "regionID": 0,
            "stunonly": true,
            "stunport": 0,
            "stuntestIP": "string"
          }
        ],
        "regionCode": "string",
        "regionID": 0,
        "regionName": "string"
      },
      "property2": {
        "avoid": true,
        "embeddedRelay": true,
        "nodes": [
          {
            "certName": "string",
            "derpport": 0,
            "forceHTTP": true,
            "hostName": "string",
            "insecureForTests": true,
            "ipv4": "string",
            "ipv6": "string",
            "name": "string",
            "regionID": 0,
            "stunonly": true,
            "stunport": 0,
            "stuntestIP": "string"
          }
        ],
        "regionCode": "string",
        "regionID": 0,
        "regionName": "string"
      }
    }
  },
  "directory": "string",
  "environment_variables": {
    "property1": "string",
    "property2": "string"
  },
  "git_auth_configs": 0,
  "metadata": [
    {
      "display_name": "string",
      "interval": 0,
      "key": "string",
      "script": "string",
      "timeout": 0
    }
  ],
  "motd_file": "string",
  "shutdown_script": "string",
  "shutdown_script_timeout": 0,
  "startup_script": "string",
  "startup_script_timeout": 0,
  "vscode_port_proxy_uri": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
appsarray of codersdk.WorkspaceAppfalse
derpmaptailcfg.DERPMapfalse
directorystringfalse
environment_variablesobjectfalse
» [any property]stringfalse
git_auth_configsintegerfalseGit auth configs stores the number of Git configurations the Coder deployment has. If this number is >0, we set up special configuration in the workspace.
metadataarray of codersdk.WorkspaceAgentMetadataDescriptionfalse
motd_filestringfalse
shutdown_scriptstringfalse
shutdown_script_timeoutintegerfalse
startup_scriptstringfalse
startup_script_timeoutintegerfalse
vscode_port_proxy_uristringfalse

agentsdk.PatchStartupLogs

{
  "logs": [
    {
      "created_at": "string",
      "level": "trace",
      "output": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
logsarray of agentsdk.StartupLogfalse

agentsdk.PostAppHealthsRequest

{
  "healths": {
    "property1": "disabled",
    "property2": "disabled"
  }
}

Properties

NameTypeRequiredRestrictionsDescription
healthsobjectfalseHealths is a map of the workspace app name and the health of the app.
» [any property]codersdk.WorkspaceAppHealthfalse

agentsdk.PostLifecycleRequest

{
  "state": "created"
}

Properties

NameTypeRequiredRestrictionsDescription
statecodersdk.WorkspaceAgentLifecyclefalse

agentsdk.PostMetadataRequest

{
  "age": 0,
  "collected_at": "2019-08-24T14:15:22Z",
  "error": "string",
  "value": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
ageintegerfalseAge is the number of seconds since the metadata was collected. It is provided in addition to CollectedAt to protect against clock skew.
collected_atstringfalse
errorstringfalse
valuestringfalse

agentsdk.PostStartupRequest

{
  "expanded_directory": "string",
  "subsystem": "envbox",
  "version": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
expanded_directorystringfalse
subsystemcodersdk.AgentSubsystemfalse
versionstringfalse

agentsdk.StartupLog

{
  "created_at": "string",
  "level": "trace",
  "output": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
created_atstringfalse
levelcodersdk.LogLevelfalse
outputstringfalse

agentsdk.Stats

{
  "connection_count": 0,
  "connection_median_latency_ms": 0,
  "connections_by_proto": {
    "property1": 0,
    "property2": 0
  },
  "metrics": [
    {
      "labels": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "name": "string",
      "type": "counter",
      "value": 0
    }
  ],
  "rx_bytes": 0,
  "rx_packets": 0,
  "session_count_jetbrains": 0,
  "session_count_reconnecting_pty": 0,
  "session_count_ssh": 0,
  "session_count_vscode": 0,
  "tx_bytes": 0,
  "tx_packets": 0
}

Properties

NameTypeRequiredRestrictionsDescription
connection_countintegerfalseConnection count is the number of connections received by an agent.
connection_median_latency_msnumberfalseConnection median latency ms is the median latency of all connections in milliseconds.
connections_by_protoobjectfalseConnections by proto is a count of connections by protocol.
» [any property]integerfalse
metricsarray of agentsdk.AgentMetricfalseMetrics collected by the agent
rx_bytesintegerfalseRx bytes is the number of received bytes.
rx_packetsintegerfalseRx packets is the number of received packets.
session_count_jetbrainsintegerfalseSession count jetbrains is the number of connections received by an agent that are from our JetBrains extension.
session_count_reconnecting_ptyintegerfalseSession count reconnecting pty is the number of connections received by an agent that are from the reconnecting web terminal.
session_count_sshintegerfalseSession count ssh is the number of connections received by an agent that are normal, non-tagged SSH sessions.
session_count_vscodeintegerfalseSession count vscode is the number of connections received by an agent that are from our VS Code extension.
tx_bytesintegerfalseTx bytes is the number of transmitted bytes.
tx_packetsintegerfalseTx packets is the number of transmitted bytes.

agentsdk.StatsResponse

{
  "report_interval": 0
}

Properties

NameTypeRequiredRestrictionsDescription
report_intervalintegerfalseReport interval is the duration after which the agent should send stats again.

clibase.Annotations

{
  "property1": "string",
  "property2": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
[any property]stringfalse

clibase.Group

{
  "description": "string",
  "name": "string",
  "parent": {
    "description": "string",
    "name": "string",
    "parent": {},
    "yaml": "string"
  },
  "yaml": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
descriptionstringfalse
namestringfalse
parentclibase.Groupfalse
yamlstringfalse

clibase.HostPort

{
  "host": "string",
  "port": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
hoststringfalse
portstringfalse

clibase.Option

{
  "annotations": {
    "property1": "string",
    "property2": "string"
  },
  "default": "string",
  "description": "string",
  "env": "string",
  "flag": "string",
  "flag_shorthand": "string",
  "group": {
    "description": "string",
    "name": "string",
    "parent": {
      "description": "string",
      "name": "string",
      "parent": {},
      "yaml": "string"
    },
    "yaml": "string"
  },
  "hidden": true,
  "name": "string",
  "use_instead": [
    {
      "annotations": {
        "property1": "string",
        "property2": "string"
      },
      "default": "string",
      "description": "string",
      "env": "string",
      "flag": "string",
      "flag_shorthand": "string",
      "group": {
        "description": "string",
        "name": "string",
        "parent": {
          "description": "string",
          "name": "string",
          "parent": {},
          "yaml": "string"
        },
        "yaml": "string"
      },
      "hidden": true,
      "name": "string",
      "use_instead": [],
      "value": null,
      "value_source": "",
      "yaml": "string"
    }
  ],
  "value": null,
  "value_source": "",
  "yaml": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
annotationsclibase.AnnotationsfalseAnnotations enable extensions to clibase higher up in the stack. It's useful for help formatting and documentation generation.
defaultstringfalseDefault is parsed into Value if set.
descriptionstringfalse
envstringfalseEnv is the environment variable used to configure this option. If unset, environment configuring is disabled.
flagstringfalseFlag is the long name of the flag used to configure this option. If unset, flag configuring is disabled.
flag_shorthandstringfalseFlag shorthand is the one-character shorthand for the flag. If unset, no shorthand is used.
groupclibase.GroupfalseGroup is a group hierarchy that helps organize this option in help, configs and other documentation.
hiddenbooleanfalse
namestringfalse
use_insteadarray of clibase.OptionfalseUse instead is a list of options that should be used instead of this one. The field is used to generate a deprecation warning.
valueanyfalseValue includes the types listed in values.go.
value_sourceclibase.ValueSourcefalse
yamlstringfalseYaml is the YAML key used to configure this option. If unset, YAML configuring is disabled.

clibase.Struct-array_codersdk_GitAuthConfig

{
  "value": [
    {
      "auth_url": "string",
      "client_id": "string",
      "id": "string",
      "no_refresh": true,
      "regex": "string",
      "scopes": ["string"],
      "token_url": "string",
      "type": "string",
      "validate_url": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
valuearray of codersdk.GitAuthConfigfalse

clibase.Struct-array_codersdk_LinkConfig

{
  "value": [
    {
      "icon": "string",
      "name": "string",
      "target": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
valuearray of codersdk.LinkConfigfalse

clibase.URL

{
  "forceQuery": true,
  "fragment": "string",
  "host": "string",
  "omitHost": true,
  "opaque": "string",
  "path": "string",
  "rawFragment": "string",
  "rawPath": "string",
  "rawQuery": "string",
  "scheme": "string",
  "user": {}
}

Properties

NameTypeRequiredRestrictionsDescription
forceQuerybooleanfalseappend a query ('?') even if RawQuery is empty
fragmentstringfalsefragment for references, without '#'
hoststringfalsehost or host:port
omitHostbooleanfalsedo not emit empty host (authority)
opaquestringfalseencoded opaque data
pathstringfalsepath (relative paths may omit leading slash)
rawFragmentstringfalseencoded fragment hint (see EscapedFragment method)
rawPathstringfalseencoded path hint (see EscapedPath method)
rawQuerystringfalseencoded query values, without '?'
schemestringfalse
userurl.Userinfofalseusername and password information

clibase.ValueSource

""

Properties

Enumerated Values

Value
``
flag
env
yaml
default

coderd.SCIMUser

{
  "active": true,
  "emails": [
    {
      "display": "string",
      "primary": true,
      "type": "string",
      "value": "[email protected]"
    }
  ],
  "groups": [null],
  "id": "string",
  "meta": {
    "resourceType": "string"
  },
  "name": {
    "familyName": "string",
    "givenName": "string"
  },
  "schemas": ["string"],
  "userName": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
activebooleanfalse
emailsarray of objectfalse
» displaystringfalse
» primarybooleanfalse
» typestringfalse
» valuestringfalse
groupsarray of undefinedfalse
idstringfalse
metaobjectfalse
» resourceTypestringfalse
nameobjectfalse
» familyNamestringfalse
» givenNamestringfalse
schemasarray of stringfalse
userNamestringfalse

coderd.cspViolation

{
  "csp-report": {}
}

Properties

NameTypeRequiredRestrictionsDescription
csp-reportobjectfalse

codersdk.APIKey

{
  "created_at": "2019-08-24T14:15:22Z",
  "expires_at": "2019-08-24T14:15:22Z",
  "id": "string",
  "last_used": "2019-08-24T14:15:22Z",
  "lifetime_seconds": 0,
  "login_type": "password",
  "scope": "all",
  "token_name": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
}

Properties

NameTypeRequiredRestrictionsDescription
created_atstringtrue
expires_atstringtrue
idstringtrue
last_usedstringtrue
lifetime_secondsintegertrue
login_typecodersdk.LoginTypetrue
scopecodersdk.APIKeyScopetrue
token_namestringtrue
updated_atstringtrue
user_idstringtrue

Enumerated Values

PropertyValue
login_typepassword
login_typegithub
login_typeoidc
login_typetoken
scopeall
scopeapplication_connect

codersdk.APIKeyScope

"all"

Properties

Enumerated Values

Value
all
application_connect

codersdk.AddLicenseRequest

{
  "license": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
licensestringtrue

codersdk.AgentSubsystem

"envbox"

Properties

Enumerated Values

Value
envbox

codersdk.AppHostResponse

{
  "host": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
hoststringfalseHost is the externally accessible URL for the Coder instance.

codersdk.AppearanceConfig

{
  "logo_url": "string",
  "service_banner": {
    "background_color": "string",
    "enabled": true,
    "message": "string"
  },
  "support_links": [
    {
      "icon": "string",
      "name": "string",
      "target": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
logo_urlstringfalse
service_bannercodersdk.ServiceBannerConfigfalse
support_linksarray of codersdk.LinkConfigfalse

codersdk.AssignableRoles

{
  "assignable": true,
  "display_name": "string",
  "name": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
assignablebooleanfalse
display_namestringfalse
namestringfalse

codersdk.AuditAction

"create"

Properties

Enumerated Values

Value
create
write
delete
start
stop
login
logout
register

codersdk.AuditDiff

{
  "property1": {
    "new": null,
    "old": null,
    "secret": true
  },
  "property2": {
    "new": null,
    "old": null,
    "secret": true
  }
}

Properties

NameTypeRequiredRestrictionsDescription
[any property]codersdk.AuditDiffFieldfalse

codersdk.AuditDiffField

{
  "new": null,
  "old": null,
  "secret": true
}

Properties

NameTypeRequiredRestrictionsDescription
newanyfalse
oldanyfalse
secretbooleanfalse

codersdk.AuditLog

{
  "action": "create",
  "additional_fields": [0],
  "description": "string",
  "diff": {
    "property1": {
      "new": null,
      "old": null,
      "secret": true
    },
    "property2": {
      "new": null,
      "old": null,
      "secret": true
    }
  },
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "ip": "string",
  "is_deleted": true,
  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
  "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",
  "resource_icon": "string",
  "resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
  "resource_link": "string",
  "resource_target": "string",
  "resource_type": "template",
  "status_code": 0,
  "time": "2019-08-24T14:15:22Z",
  "user": {
    "avatar_url": "http://example.com",
    "created_at": "2019-08-24T14:15:22Z",
    "email": "[email protected]",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "last_seen_at": "2019-08-24T14:15:22Z",
    "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
    "roles": [
      {
        "display_name": "string",
        "name": "string"
      }
    ],
    "status": "active",
    "username": "string"
  },
  "user_agent": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
actioncodersdk.AuditActionfalse
additional_fieldsarray of integerfalse
descriptionstringfalse
diffcodersdk.AuditDifffalse
idstringfalse
ipstringfalse
is_deletedbooleanfalse
organization_idstringfalse
request_idstringfalse
resource_iconstringfalse
resource_idstringfalse
resource_linkstringfalse
resource_targetstringfalseResource target is the name of the resource.
resource_typecodersdk.ResourceTypefalse
status_codeintegerfalse
timestringfalse
usercodersdk.Userfalse
user_agentstringfalse

codersdk.AuditLogResponse

{
  "audit_logs": [
    {
      "action": "create",
      "additional_fields": [0],
      "description": "string",
      "diff": {
        "property1": {
          "new": null,
          "old": null,
          "secret": true
        },
        "property2": {
          "new": null,
          "old": null,
          "secret": true
        }
      },
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "ip": "string",
      "is_deleted": true,
      "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
      "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",
      "resource_icon": "string",
      "resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
      "resource_link": "string",
      "resource_target": "string",
      "resource_type": "template",
      "status_code": 0,
      "time": "2019-08-24T14:15:22Z",
      "user": {
        "avatar_url": "http://example.com",
        "created_at": "2019-08-24T14:15:22Z",
        "email": "[email protected]",
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "last_seen_at": "2019-08-24T14:15:22Z",
        "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
        "roles": [
          {
            "display_name": "string",
            "name": "string"
          }
        ],
        "status": "active",
        "username": "string"
      },
      "user_agent": "string"
    }
  ],
  "count": 0
}

Properties

NameTypeRequiredRestrictionsDescription
audit_logsarray of codersdk.AuditLogfalse
countintegerfalse

codersdk.AuthMethod

{
  "enabled": true
}

Properties

NameTypeRequiredRestrictionsDescription
enabledbooleanfalse

codersdk.AuthMethods

{
  "github": {
    "enabled": true
  },
  "oidc": {
    "enabled": true,
    "iconUrl": "string",
    "signInText": "string"
  },
  "password": {
    "enabled": true
  }
}

Properties

NameTypeRequiredRestrictionsDescription
githubcodersdk.AuthMethodfalse
oidccodersdk.OIDCAuthMethodfalse
passwordcodersdk.AuthMethodfalse

codersdk.AuthorizationCheck

{
  "action": "create",
  "object": {
    "organization_id": "string",
    "owner_id": "string",
    "resource_id": "string",
    "resource_type": "workspace"
  }
}

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.

Properties

NameTypeRequiredRestrictionsDescription
actionstringfalse
objectcodersdk.AuthorizationObjectfalseObject 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

PropertyValue
actioncreate
actionread
actionupdate
actiondelete

codersdk.AuthorizationObject

{
  "organization_id": "string",
  "owner_id": "string",
  "resource_id": "string",
  "resource_type": "workspace"
}

AuthorizationObject can represent a "set" of objects, such as: all workspaces in an organization, all workspaces owned by me, all workspaces across the entire product.

Properties

NameTypeRequiredRestrictionsDescription
organization_idstringfalseOrganization ID (optional) adds the set constraint to all resources owned by a given organization.
owner_idstringfalseOwner ID (optional) adds the set constraint to all resources owned by a given user.
resource_idstringfalseResource ID (optional) reduces the set to a singular resource. This assigns a resource ID to the resource type, eg: a single workspace. The rbac library will not fetch the resource from the database, so if you are using this option, you should also set the owner ID and organization ID if possible. Be as specific as possible using all the fields relevant.
resource_typecodersdk.RBACResourcefalseResource type is the name of the resource. ./coderd/rbac/object.go has the list of valid resource types.

codersdk.AuthorizationRequest

{
  "checks": {
    "property1": {
      "action": "create",
      "object": {
        "organization_id": "string",
        "owner_id": "string",
        "resource_id": "string",
        "resource_type": "workspace"
      }
    },
    "property2": {
      "action": "create",
      "object": {
        "organization_id": "string",
        "owner_id": "string",
        "resource_id": "string",
        "resource_type": "workspace"
      }
    }
  }
}

Properties

NameTypeRequiredRestrictionsDescription
checksobjectfalseChecks is a map keyed with an arbitrary string to a permission check. The key can be any string that is helpful to the caller, and allows multiple permission checks to be run in a single request. The key ensures that each permission check has the same key in the response.
» [any property]codersdk.AuthorizationCheckfalseIt is used to check if the currently authenticated user (or the specified user) can do a given action to a given set of objects.

codersdk.AuthorizationResponse

{
  "property1": true,
  "property2": true
}

Properties

NameTypeRequiredRestrictionsDescription
[any property]booleanfalse

codersdk.BuildInfoResponse

{
  "dashboard_url": "string",
  "external_url": "string",
  "version": "string",
  "workspace_proxy": true
}

Properties

NameTypeRequiredRestrictionsDescription
dashboard_urlstringfalseDashboard URL is the URL to hit the deployment's dashboard. For external workspace proxies, this is the coderd they are connected to.
external_urlstringfalseExternal 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.
versionstringfalseVersion returns the semantic version of the build.
workspace_proxybooleanfalse

codersdk.BuildReason

"initiator"

Properties

Enumerated Values

Value
initiator
autostart
autostop

codersdk.CreateFirstUserRequest

{
  "email": "string",
  "password": "string",
  "trial": true,
  "username": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
emailstringtrue
passwordstringtrue
trialbooleanfalse
usernamestringtrue

codersdk.CreateFirstUserResponse

{
  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
}

Properties

NameTypeRequiredRestrictionsDescription
organization_idstringfalse
user_idstringfalse

codersdk.CreateGroupRequest

{
  "avatar_url": "string",
  "name": "string",
  "quota_allowance": 0
}

Properties

NameTypeRequiredRestrictionsDescription
avatar_urlstringfalse
namestringfalse
quota_allowanceintegerfalse

codersdk.CreateOrganizationRequest

{
  "name": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
namestringtrue

codersdk.CreateTemplateRequest

{
  "allow_user_autostart": true,
  "allow_user_autostop": true,
  "allow_user_cancel_workspace_jobs": true,
  "default_ttl_ms": 0,
  "description": "string",
  "display_name": "string",
  "failure_ttl_ms": 0,
  "icon": "string",
  "inactivity_ttl_ms": 0,
  "max_ttl_ms": 0,
  "name": "string",
  "template_version_id": "0ba39c92-1f1b-4c32-aa3e-9925d7713eb1"
}

Properties

NameTypeRequiredRestrictionsDescription
allow_user_autostartbooleanfalseAllow user autostart allows users to set a schedule for autostarting their workspace. By default this is true. This can only be disabled when using an enterprise license.
allow_user_autostopbooleanfalseAllow user autostop allows users to set a custom workspace TTL to use in place of the template's DefaultTTL field. By default this is true. If false, the DefaultTTL will always be used. This can only be disabled when using an enterprise license.
allow_user_cancel_workspace_jobsbooleanfalseAllow users to cancel in-progress workspace jobs. *bool as the default value is "true".
default_ttl_msintegerfalseDefault ttl ms allows optionally specifying the default TTL for all workspaces created from this template.
descriptionstringfalseDescription is a description of what the template contains. It must be less than 128 bytes.
display_namestringfalseDisplay name is the displayed name of the template.
failure_ttl_msintegerfalseFailure ttl ms allows optionally specifying the max lifetime before Coder stops all resources for failed workspaces created from this template.
iconstringfalseIcon is a relative path or external URL that specifies an icon to be displayed in the dashboard.
inactivity_ttl_msintegerfalseInactivity ttl ms allows optionally specifying the max lifetime before Coder deletes inactive workspaces created from this template.
max_ttl_msintegerfalseMax ttl ms allows optionally specifying the max lifetime for workspaces created from this template.
namestringtrueName is the name of the template.
template_version_idstringtrueTemplate version ID is an in-progress or completed job to use as an initial version of the template.
This is required on creation to enable a user-flow of validating a template works. There is no reason the data-model cannot support empty templates, but it doesn't make sense for users.

codersdk.CreateTemplateVersionDryRunRequest

{
  "rich_parameter_values": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "user_variable_values": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "workspace_name": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
rich_parameter_valuesarray of codersdk.WorkspaceBuildParameterfalse
user_variable_valuesarray of codersdk.VariableValuefalse
workspace_namestringfalse

codersdk.CreateTemplateVersionRequest

{
  "example_id": "string",
  "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",
  "name": "string",
  "provisioner": "terraform",
  "storage_method": "file",
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",
  "user_variable_values": [
    {
      "name": "string",
      "value": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
example_idstringfalse
file_idstringfalse
namestringfalse
provisionerstringtrue
storage_methodcodersdk.ProvisionerStorageMethodtrue
tagsobjectfalse
» [any property]stringfalse
template_idstringfalseTemplate ID optionally associates a version with a template.
user_variable_valuesarray of codersdk.VariableValuefalse

Enumerated Values

PropertyValue
provisionerterraform
provisionerecho
storage_methodfile

codersdk.CreateTestAuditLogRequest

{
  "action": "create",
  "additional_fields": [0],
  "build_reason": "autostart",
  "resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
  "resource_type": "template",
  "time": "2019-08-24T14:15:22Z"
}

Properties

NameTypeRequiredRestrictionsDescription
actioncodersdk.AuditActionfalse
additional_fieldsarray of integerfalse
build_reasoncodersdk.BuildReasonfalse
resource_idstringfalse
resource_typecodersdk.ResourceTypefalse
timestringfalse

Enumerated Values

PropertyValue
actioncreate
actionwrite
actiondelete
actionstart
actionstop
build_reasonautostart
build_reasonautostop
build_reasoninitiator
resource_typetemplate
resource_typetemplate_version
resource_typeuser
resource_typeworkspace
resource_typeworkspace_build
resource_typegit_ssh_key
resource_typeauditable_group

codersdk.CreateTokenRequest

{
  "lifetime": 0,
  "scope": "all",
  "token_name": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
lifetimeintegerfalse
scopecodersdk.APIKeyScopefalse
token_namestringfalse

Enumerated Values

PropertyValue
scopeall
scopeapplication_connect

codersdk.CreateUserRequest

{
  "email": "[email protected]",
  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
  "password": "string",
  "username": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
emailstringtrue
organization_idstringfalse
passwordstringtrue
usernamestringtrue

codersdk.CreateWorkspaceBuildRequest

{
  "dry_run": true,
  "log_level": "debug",
  "orphan": true,
  "rich_parameter_values": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "state": [0],
  "template_version_id": "0ba39c92-1f1b-4c32-aa3e-9925d7713eb1",
  "transition": "create"
}

Properties

NameTypeRequiredRestrictionsDescription
dry_runbooleanfalse
log_levelcodersdk.ProvisionerLogLevelfalseLog level changes the default logging verbosity of a provider ("info" if empty).
orphanbooleanfalseOrphan may be set for the Destroy transition.
rich_parameter_valuesarray of codersdk.WorkspaceBuildParameterfalseRich 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.
statearray of integerfalse
template_version_idstringfalse
transitioncodersdk.WorkspaceTransitiontrue

Enumerated Values

PropertyValue
log_leveldebug
transitioncreate
transitionstart
transitionstop
transitiondelete

codersdk.CreateWorkspaceProxyRequest

{
  "display_name": "string",
  "icon": "string",
  "name": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
display_namestringfalse
iconstringfalse
namestringtrue

codersdk.CreateWorkspaceRequest

{
  "autostart_schedule": "string",
  "name": "string",
  "rich_parameter_values": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",
  "ttl_ms": 0
}

Properties

NameTypeRequiredRestrictionsDescription
autostart_schedulestringfalse
namestringtrue
rich_parameter_valuesarray of codersdk.WorkspaceBuildParameterfalseRich parameter values allows for additional parameters to be provided during the initial provision.
template_idstringtrue
ttl_msintegerfalse

codersdk.DAUEntry

{
  "amount": 0,
  "date": "2019-08-24T14:15:22Z"
}

Properties

NameTypeRequiredRestrictionsDescription
amountintegerfalse
datestringfalse

codersdk.DAUsResponse

{
  "entries": [
    {
      "amount": 0,
      "date": "2019-08-24T14:15:22Z"
    }
  ],
  "tz_hour_offset": 0
}

Properties

NameTypeRequiredRestrictionsDescription
entriesarray of codersdk.DAUEntryfalse
tz_hour_offsetintegerfalse

codersdk.DERP

{
  "config": {
    "path": "string",
    "url": "string"
  },
  "server": {
    "enable": true,
    "region_code": "string",
    "region_id": 0,
    "region_name": "string",
    "relay_url": {
      "forceQuery": true,
      "fragment": "string",
      "host": "string",
      "omitHost": true,
      "opaque": "string",
      "path": "string",
      "rawFragment": "string",
      "rawPath": "string",
      "rawQuery": "string",
      "scheme": "string",
      "user": {}
    },
    "stun_addresses": ["string"]
  }
}

Properties

NameTypeRequiredRestrictionsDescription
configcodersdk.DERPConfigfalse
servercodersdk.DERPServerConfigfalse

codersdk.DERPConfig

{
  "path": "string",
  "url": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
pathstringfalse
urlstringfalse

codersdk.DERPRegion

{
  "latency_ms": 0,
  "preferred": true
}

Properties

NameTypeRequiredRestrictionsDescription
latency_msnumberfalse
preferredbooleanfalse

codersdk.DERPServerConfig

{
  "enable": true,
  "region_code": "string",
  "region_id": 0,
  "region_name": "string",
  "relay_url": {
    "forceQuery": true,
    "fragment": "string",
    "host": "string",
    "omitHost": true,
    "opaque": "string",
    "path": "string",
    "rawFragment": "string",
    "rawPath": "string",
    "rawQuery": "string",
    "scheme": "string",
    "user": {}
  },
  "stun_addresses": ["string"]
}

Properties

NameTypeRequiredRestrictionsDescription
enablebooleanfalse
region_codestringfalse
region_idintegerfalse
region_namestringfalse
relay_urlclibase.URLfalse
stun_addressesarray of stringfalse

codersdk.DangerousConfig

{
  "allow_all_cors": true,
  "allow_path_app_sharing": true,
  "allow_path_app_site_owner_access": true
}

Properties

NameTypeRequiredRestrictionsDescription
allow_all_corsbooleanfalse
allow_path_app_sharingbooleanfalse
allow_path_app_site_owner_accessbooleanfalse

codersdk.DeploymentConfig

{
  "config": {
    "access_url": {
      "forceQuery": true,
      "fragment": "string",
      "host": "string",
      "omitHost": true,
      "opaque": "string",
      "path": "string",
      "rawFragment": "string",
      "rawPath": "string",
      "rawQuery": "string",
      "scheme": "string",
      "user": {}
    },
    "address": {
      "host": "string",
      "port": "string"
    },
    "agent_fallback_troubleshooting_url": {
      "forceQuery": true,
      "fragment": "string",
      "host": "string",
      "omitHost": true,
      "opaque": "string",
      "path": "string",
      "rawFragment": "string",
      "rawPath": "string",
      "rawQuery": "string",
      "scheme": "string",
      "user": {}
    },
    "agent_stat_refresh_interval": 0,
    "autobuild_poll_interval": 0,
    "browser_only": true,
    "cache_directory": "string",
    "config": "string",
    "config_ssh": {
      "deploymentName": "string",
      "sshconfigOptions": ["string"]
    },
    "dangerous": {
      "allow_all_cors": true,
      "allow_path_app_sharing": true,
      "allow_path_app_site_owner_access": true
    },
    "derp": {
      "config": {
        "path": "string",
        "url": "string"
      },
      "server": {
        "enable": true,
        "region_code": "string",
        "region_id": 0,
        "region_name": "string",
        "relay_url": {
          "forceQuery": true,
          "fragment": "string",
          "host": "string",
          "omitHost": true,
          "opaque": "string",
          "path": "string",
          "rawFragment": "string",
          "rawPath": "string",
          "rawQuery": "string",
          "scheme": "string",
          "user": {}
        },
        "stun_addresses": ["string"]
      }
    },
    "disable_owner_workspace_exec": true,
    "disable_password_auth": true,
    "disable_path_apps": true,
    "disable_session_expiry_refresh": true,
    "experiments": ["string"],
    "git_auth": {
      "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": "string",
    "in_memory_database": true,
    "logging": {
      "human": "string",
      "json": "string",
      "stackdriver": "string"
    },
    "max_session_expiry": 0,
    "max_token_lifetime": 0,
    "metrics_cache_refresh_interval": 0,
    "oauth2": {
      "github": {
        "allow_everyone": true,
        "allow_signups": true,
        "allowed_orgs": ["string"],
        "allowed_teams": ["string"],
        "client_id": "string",
        "client_secret": "string",
        "enterprise_base_url": "string"
      }
    },
    "oidc": {
      "allow_signups": true,
      "auth_url_params": {},
      "client_id": "string",
      "client_secret": "string",
      "email_domain": ["string"],
      "email_field": "string",
      "group_mapping": {},
      "groups_field": "string",
      "icon_url": {
        "forceQuery": true,
        "fragment": "string",
        "host": "string",
        "omitHost": true,
        "opaque": "string",
        "path": "string",
        "rawFragment": "string",
        "rawPath": "string",
        "rawQuery": "string",
        "scheme": "string",
        "user": {}
      },
      "ignore_email_verified": true,
      "ignore_user_info": true,
      "issuer_url": "string",
      "scopes": ["string"],
      "sign_in_text": "string",
      "username_field": "string"
    },
    "pg_connection_url": "string",
    "pprof": {
      "address": {
        "host": "string",
        "port": "string"
      },
      "enable": true
    },
    "prometheus": {
      "address": {
        "host": "string",
        "port": "string"
      },
      "collect_agent_stats": true,
      "enable": true
    },
    "provisioner": {
      "daemon_poll_interval": 0,
      "daemon_poll_jitter": 0,
      "daemons": 0,
      "force_cancel_interval": 0
    },
    "proxy_trusted_headers": ["string"],
    "proxy_trusted_origins": ["string"],
    "rate_limit": {
      "api": 0,
      "disable_all": true
    },
    "redirect_to_access_url": true,
    "scim_api_key": "string",
    "secure_auth_cookie": true,
    "ssh_keygen_algorithm": "string",
    "strict_transport_security": 0,
    "strict_transport_security_options": ["string"],
    "support": {
      "links": {
        "value": [
          {
            "icon": "string",
            "name": "string",
            "target": "string"
          }
        ]
      }
    },
    "swagger": {
      "enable": true
    },
    "telemetry": {
      "enable": true,
      "trace": true,
      "url": {
        "forceQuery": true,
        "fragment": "string",
        "host": "string",
        "omitHost": true,
        "opaque": "string",
        "path": "string",
        "rawFragment": "string",
        "rawPath": "string",
        "rawQuery": "string",
        "scheme": "string",
        "user": {}
      }
    },
    "tls": {
      "address": {
        "host": "string",
        "port": "string"
      },
      "cert_file": ["string"],
      "client_auth": "string",
      "client_ca_file": "string",
      "client_cert_file": "string",
      "client_key_file": "string",
      "enable": true,
      "key_file": ["string"],
      "min_version": "string",
      "redirect_http": true
    },
    "trace": {
      "capture_logs": true,
      "enable": true,
      "honeycomb_api_key": "string"
    },
    "update_check": true,
    "verbose": true,
    "wgtunnel_host": "string",
    "wildcard_access_url": {
      "forceQuery": true,
      "fragment": "string",
      "host": "string",
      "omitHost": true,
      "opaque": "string",
      "path": "string",
      "rawFragment": "string",
      "rawPath": "string",
      "rawQuery": "string",
      "scheme": "string",
      "user": {}
    },
    "write_config": true
  },
  "options": [
    {
      "annotations": {
        "property1": "string",
        "property2": "string"
      },
      "default": "string",
      "description": "string",
      "env": "string",
      "flag": "string",
      "flag_shorthand": "string",
      "group": {
        "description": "string",
        "name": "string",
        "parent": {
          "description": "string",
          "name": "string",
          "parent": {},
          "yaml": "string"
        },
        "yaml": "string"
      },
      "hidden": true,
      "name": "string",
      "use_instead": [{}],
      "value": null,
      "value_source": "",
      "yaml": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
configcodersdk.DeploymentValuesfalse
optionsarray of clibase.Optionfalse

codersdk.DeploymentStats

{
  "aggregated_from": "2019-08-24T14:15:22Z",
  "collected_at": "2019-08-24T14:15:22Z",
  "next_update_at": "2019-08-24T14:15:22Z",
  "session_count": {
    "jetbrains": 0,
    "reconnecting_pty": 0,
    "ssh": 0,
    "vscode": 0
  },
  "workspaces": {
    "building": 0,
    "connection_latency_ms": {
      "p50": 0,
      "p95": 0
    },
    "failed": 0,
    "pending": 0,
    "running": 0,
    "rx_bytes": 0,
    "stopped": 0,
    "tx_bytes": 0
  }
}

Properties

NameTypeRequiredRestrictionsDescription
aggregated_fromstringfalseAggregated from is the time in which stats are aggregated from. This might be back in time a specific duration or interval.
collected_atstringfalseCollected at is the time in which stats are collected at.
next_update_atstringfalseNext update at is the time when the next batch of stats will be updated.
session_countcodersdk.SessionCountDeploymentStatsfalse
workspacescodersdk.WorkspaceDeploymentStatsfalse

codersdk.DeploymentValues

{
  "access_url": {
    "forceQuery": true,
    "fragment": "string",
    "host": "string",
    "omitHost": true,
    "opaque": "string",
    "path": "string",
    "rawFragment": "string",
    "rawPath": "string",
    "rawQuery": "string",
    "scheme": "string",
    "user": {}
  },
  "address": {
    "host": "string",
    "port": "string"
  },
  "agent_fallback_troubleshooting_url": {
    "forceQuery": true,
    "fragment": "string",
    "host": "string",
    "omitHost": true,
    "opaque": "string",
    "path": "string",
    "rawFragment": "string",
    "rawPath": "string",
    "rawQuery": "string",
    "scheme": "string",
    "user": {}
  },
  "agent_stat_refresh_interval": 0,
  "autobuild_poll_interval": 0,
  "browser_only": true,
  "cache_directory": "string",
  "config": "string",
  "config_ssh": {
    "deploymentName": "string",
    "sshconfigOptions": ["string"]
  },
  "dangerous": {
    "allow_all_cors": true,
    "allow_path_app_sharing": true,
    "allow_path_app_site_owner_access": true
  },
  "derp": {
    "config": {
      "path": "string",
      "url": "string"
    },
    "server": {
      "enable": true,
      "region_code": "string",
      "region_id": 0,
      "region_name": "string",
      "relay_url": {
        "forceQuery": true,
        "fragment": "string",
        "host": "string",
        "omitHost": true,
        "opaque": "string",
        "path": "string",
        "rawFragment": "string",
        "rawPath": "string",
        "rawQuery": "string",
        "scheme": "string",
        "user": {}
      },
      "stun_addresses": ["string"]
    }
  },
  "disable_owner_workspace_exec": true,
  "disable_password_auth": true,
  "disable_path_apps": true,
  "disable_session_expiry_refresh": true,
  "experiments": ["string"],
  "git_auth": {
    "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": "string",
  "in_memory_database": true,
  "logging": {
    "human": "string",
    "json": "string",
    "stackdriver": "string"
  },
  "max_session_expiry": 0,
  "max_token_lifetime": 0,
  "metrics_cache_refresh_interval": 0,
  "oauth2": {
    "github": {
      "allow_everyone": true,
      "allow_signups": true,
      "allowed_orgs": ["string"],
      "allowed_teams": ["string"],
      "client_id": "string",
      "client_secret": "string",
      "enterprise_base_url": "string"
    }
  },
  "oidc": {
    "allow_signups": true,
    "auth_url_params": {},
    "client_id": "string",
    "client_secret": "string",
    "email_domain": ["string"],
    "email_field": "string",
    "group_mapping": {},
    "groups_field": "string",
    "icon_url": {
      "forceQuery": true,
      "fragment": "string",
      "host": "string",
      "omitHost": true,
      "opaque": "string",
      "path": "string",
      "rawFragment": "string",
      "rawPath": "string",
      "rawQuery": "string",
      "scheme": "string",
      "user": {}
    },
    "ignore_email_verified": true,
    "ignore_user_info": true,
    "issuer_url": "string",
    "scopes": ["string"],
    "sign_in_text": "string",
    "username_field": "string"
  },
  "pg_connection_url": "string",
  "pprof": {
    "address": {
      "host": "string",
      "port": "string"
    },
    "enable": true
  },
  "prometheus": {
    "address": {
      "host": "string",
      "port": "string"
    },
    "collect_agent_stats": true,
    "enable": true
  },
  "provisioner": {
    "daemon_poll_interval": 0,
    "daemon_poll_jitter": 0,
    "daemons": 0,
    "force_cancel_interval": 0
  },
  "proxy_trusted_headers": ["string"],
  "proxy_trusted_origins": ["string"],
  "rate_limit": {
    "api": 0,
    "disable_all": true
  },
  "redirect_to_access_url": true,
  "scim_api_key": "string",
  "secure_auth_cookie": true,
  "ssh_keygen_algorithm": "string",
  "strict_transport_security": 0,
  "strict_transport_security_options": ["string"],
  "support": {
    "links": {
      "value": [
        {
          "icon": "string",
          "name": "string",
          "target": "string"
        }
      ]
    }
  },
  "swagger": {
    "enable": true
  },
  "telemetry": {
    "enable": true,
    "trace": true,
    "url": {
      "forceQuery": true,
      "fragment": "string",
      "host": "string",
      "omitHost": true,
      "opaque": "string",
      "path": "string",
      "rawFragment": "string",
      "rawPath": "string",
      "rawQuery": "string",
      "scheme": "string",
      "user": {}
    }
  },
  "tls": {
    "address": {
      "host": "string",
      "port": "string"
    },
    "cert_file": ["string"],
    "client_auth": "string",
    "client_ca_file": "string",
    "client_cert_file": "string",
    "client_key_file": "string",
    "enable": true,
    "key_file": ["string"],
    "min_version": "string",
    "redirect_http": true
  },
  "trace": {
    "capture_logs": true,
    "enable": true,
    "honeycomb_api_key": "string"
  },
  "update_check": true,
  "verbose": true,
  "wgtunnel_host": "string",
  "wildcard_access_url": {
    "forceQuery": true,
    "fragment": "string",
    "host": "string",
    "omitHost": true,
    "opaque": "string",
    "path": "string",
    "rawFragment": "string",
    "rawPath": "string",
    "rawQuery": "string",
    "scheme": "string",
    "user": {}
  },
  "write_config": true
}

Properties

NameTypeRequiredRestrictionsDescription
access_urlclibase.URLfalse
addressclibase.HostPortfalseAddress Use HTTPAddress or TLS.Address instead.
agent_fallback_troubleshooting_urlclibase.URLfalse
agent_stat_refresh_intervalintegerfalse
autobuild_poll_intervalintegerfalse
browser_onlybooleanfalse
cache_directorystringfalse
configstringfalse
config_sshcodersdk.SSHConfigfalse
dangerouscodersdk.DangerousConfigfalse
derpcodersdk.DERPfalse
disable_owner_workspace_execbooleanfalse
disable_password_authbooleanfalse
disable_path_appsbooleanfalse
disable_session_expiry_refreshbooleanfalse
experimentsarray of stringfalse
git_authclibase.Struct-array_codersdk_GitAuthConfigfalse
http_addressstringfalseHttp address is a string because it may be set to zero to disable.
in_memory_databasebooleanfalse
loggingcodersdk.LoggingConfigfalse
max_session_expiryintegerfalse
max_token_lifetimeintegerfalse
metrics_cache_refresh_intervalintegerfalse
oauth2codersdk.OAuth2Configfalse
oidccodersdk.OIDCConfigfalse
pg_connection_urlstringfalse
pprofcodersdk.PprofConfigfalse
prometheuscodersdk.PrometheusConfigfalse
provisionercodersdk.ProvisionerConfigfalse
proxy_trusted_headersarray of stringfalse
proxy_trusted_originsarray of stringfalse
rate_limitcodersdk.RateLimitConfigfalse
redirect_to_access_urlbooleanfalse
scim_api_keystringfalse
secure_auth_cookiebooleanfalse
ssh_keygen_algorithmstringfalse
strict_transport_securityintegerfalse
strict_transport_security_optionsarray of stringfalse
supportcodersdk.SupportConfigfalse
swaggercodersdk.SwaggerConfigfalse
telemetrycodersdk.TelemetryConfigfalse
tlscodersdk.TLSConfigfalse
tracecodersdk.TraceConfigfalse
update_checkbooleanfalse
verbosebooleanfalse
wgtunnel_hoststringfalse
wildcard_access_urlclibase.URLfalse
write_configbooleanfalse

codersdk.Entitlement

"entitled"

Properties

Enumerated Values

Value
entitled
grace_period
not_entitled

codersdk.Entitlements

{
  "errors": ["string"],
  "features": {
    "property1": {
      "actual": 0,
      "enabled": true,
      "entitlement": "entitled",
      "limit": 0
    },
    "property2": {
      "actual": 0,
      "enabled": true,
      "entitlement": "entitled",
      "limit": 0
    }
  },
  "has_license": true,
  "require_telemetry": true,
  "trial": true,
  "warnings": ["string"]
}

Properties

NameTypeRequiredRestrictionsDescription
errorsarray of stringfalse
featuresobjectfalse
» [any property]codersdk.Featurefalse
has_licensebooleanfalse
require_telemetrybooleanfalse
trialbooleanfalse
warningsarray of stringfalse

codersdk.Experiment

"moons"

Properties

Enumerated Values

Value
moons
workspace_actions
workspace_filter

codersdk.Feature

{
  "actual": 0,
  "enabled": true,
  "entitlement": "entitled",
  "limit": 0
}

Properties

NameTypeRequiredRestrictionsDescription
actualintegerfalse
enabledbooleanfalse
entitlementcodersdk.Entitlementfalse
limitintegerfalse

codersdk.GenerateAPIKeyResponse

{
  "key": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
keystringfalse

codersdk.GetUsersResponse

{
  "count": 0,
  "users": [
    {
      "avatar_url": "http://example.com",
      "created_at": "2019-08-24T14:15:22Z",
      "email": "[email protected]",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "last_seen_at": "2019-08-24T14:15:22Z",
      "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
      "roles": [
        {
          "display_name": "string",
          "name": "string"
        }
      ],
      "status": "active",
      "username": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
countintegerfalse
usersarray of codersdk.Userfalse

codersdk.GitAuthConfig

{
  "auth_url": "string",
  "client_id": "string",
  "id": "string",
  "no_refresh": true,
  "regex": "string",
  "scopes": ["string"],
  "token_url": "string",
  "type": "string",
  "validate_url": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
auth_urlstringfalse
client_idstringfalse
idstringfalse
no_refreshbooleanfalse
regexstringfalse
scopesarray of stringfalse
token_urlstringfalse
typestringfalse
validate_urlstringfalse

codersdk.GitProvider

"azure-devops"

Properties

Enumerated Values

Value
azure-devops
github
gitlab
bitbucket

codersdk.GitSSHKey

{
  "created_at": "2019-08-24T14:15:22Z",
  "public_key": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
}

Properties

NameTypeRequiredRestrictionsDescription
created_atstringfalse
public_keystringfalse
updated_atstringfalse
user_idstringfalse

codersdk.Group

{
  "avatar_url": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "members": [
    {
      "avatar_url": "http://example.com",
      "created_at": "2019-08-24T14:15:22Z",
      "email": "[email protected]",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "last_seen_at": "2019-08-24T14:15:22Z",
      "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
      "roles": [
        {
          "display_name": "string",
          "name": "string"
        }
      ],
      "status": "active",
      "username": "string"
    }
  ],
  "name": "string",
  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
  "quota_allowance": 0
}

Properties

NameTypeRequiredRestrictionsDescription
avatar_urlstringfalse
idstringfalse
membersarray of codersdk.Userfalse
namestringfalse
organization_idstringfalse
quota_allowanceintegerfalse

codersdk.Healthcheck

{
  "interval": 0,
  "threshold": 0,
  "url": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
intervalintegerfalseInterval specifies the seconds between each health check.
thresholdintegerfalseThreshold specifies the number of consecutive failed health checks before returning "unhealthy".
urlstringfalseURL specifies the endpoint to check for the app health.

codersdk.IssueReconnectingPTYSignedTokenRequest

{
  "agentID": "bc282582-04f9-45ce-b904-3e3bfab66958",
  "url": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
agentIDstringtrue
urlstringtrueURL is the URL of the reconnecting-pty endpoint you are connecting to.

codersdk.IssueReconnectingPTYSignedTokenResponse

{
  "signed_token": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
signed_tokenstringfalse

codersdk.JobErrorCode

"MISSING_TEMPLATE_PARAMETER"

Properties

Enumerated Values

Value
MISSING_TEMPLATE_PARAMETER
REQUIRED_TEMPLATE_VARIABLES

codersdk.License

{
  "claims": {},
  "id": 0,
  "uploaded_at": "2019-08-24T14:15:22Z",
  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f"
}

Properties

NameTypeRequiredRestrictionsDescription
claimsobjectfalseClaims are the JWT claims asserted by the license. Here we use a generic string map to ensure that all data from the server is parsed verbatim, not just the fields this version of Coder understands.
idintegerfalse
uploaded_atstringfalse
uuidstringfalse

codersdk.LinkConfig

{
  "icon": "string",
  "name": "string",
  "target": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
iconstringfalse
namestringfalse
targetstringfalse

codersdk.LogLevel

"trace"

Properties

Enumerated Values

Value
trace
debug
info
warn
error

codersdk.LogSource

"provisioner_daemon"

Properties

Enumerated Values

Value
provisioner_daemon
provisioner

codersdk.LoggingConfig

{
  "human": "string",
  "json": "string",
  "stackdriver": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
humanstringfalse
jsonstringfalse
stackdriverstringfalse

codersdk.LoginType

"password"

Properties

Enumerated Values

Value
password
github
oidc
token

codersdk.LoginWithPasswordRequest

{
  "email": "[email protected]",
  "password": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
emailstringtrue
passwordstringtrue

codersdk.LoginWithPasswordResponse

{
  "session_token": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
session_tokenstringtrue

codersdk.OAuth2Config

{
  "github": {
    "allow_everyone": true,
    "allow_signups": true,
    "allowed_orgs": ["string"],
    "allowed_teams": ["string"],
    "client_id": "string",
    "client_secret": "string",
    "enterprise_base_url": "string"
  }
}

Properties

NameTypeRequiredRestrictionsDescription
githubcodersdk.OAuth2GithubConfigfalse

codersdk.OAuth2GithubConfig

{
  "allow_everyone": true,
  "allow_signups": true,
  "allowed_orgs": ["string"],
  "allowed_teams": ["string"],
  "client_id": "string",
  "client_secret": "string",
  "enterprise_base_url": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
allow_everyonebooleanfalse
allow_signupsbooleanfalse
allowed_orgsarray of stringfalse
allowed_teamsarray of stringfalse
client_idstringfalse
client_secretstringfalse
enterprise_base_urlstringfalse

codersdk.OIDCAuthMethod

{
  "enabled": true,
  "iconUrl": "string",
  "signInText": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
enabledbooleanfalse
iconUrlstringfalse
signInTextstringfalse

codersdk.OIDCConfig

{
  "allow_signups": true,
  "auth_url_params": {},
  "client_id": "string",
  "client_secret": "string",
  "email_domain": ["string"],
  "email_field": "string",
  "group_mapping": {},
  "groups_field": "string",
  "icon_url": {
    "forceQuery": true,
    "fragment": "string",
    "host": "string",
    "omitHost": true,
    "opaque": "string",
    "path": "string",
    "rawFragment": "string",
    "rawPath": "string",
    "rawQuery": "string",
    "scheme": "string",
    "user": {}
  },
  "ignore_email_verified": true,
  "ignore_user_info": true,
  "issuer_url": "string",
  "scopes": ["string"],
  "sign_in_text": "string",
  "username_field": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
allow_signupsbooleanfalse
auth_url_paramsobjectfalse
client_idstringfalse
client_secretstringfalse
email_domainarray of stringfalse
email_fieldstringfalse
group_mappingobjectfalse
groups_fieldstringfalse
icon_urlclibase.URLfalse
ignore_email_verifiedbooleanfalse
ignore_user_infobooleanfalse
issuer_urlstringfalse
scopesarray of stringfalse
sign_in_textstringfalse
username_fieldstringfalse

codersdk.Organization

{
  "created_at": "2019-08-24T14:15:22Z",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}

Properties

NameTypeRequiredRestrictionsDescription
created_atstringtrue
idstringtrue
namestringtrue
updated_atstringtrue

codersdk.OrganizationMember

{
  "created_at": "2019-08-24T14:15:22Z",
  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
  "roles": [
    {
      "display_name": "string",
      "name": "string"
    }
  ],
  "updated_at": "2019-08-24T14:15:22Z",
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
}

Properties

NameTypeRequiredRestrictionsDescription
created_atstringfalse
organization_idstringfalse
rolesarray of codersdk.Rolefalse
updated_atstringfalse
user_idstringfalse

codersdk.PatchTemplateVersionRequest

{
  "name": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
namestringfalse

codersdk.PatchWorkspaceProxy

{
  "display_name": "string",
  "icon": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "regenerate_token": true
}

Properties

NameTypeRequiredRestrictionsDescription
display_namestringtrue
iconstringtrue
idstringtrue
namestringtrue
regenerate_tokenbooleanfalse

codersdk.PprofConfig

{
  "address": {
    "host": "string",
    "port": "string"
  },
  "enable": true
}

Properties

NameTypeRequiredRestrictionsDescription
addressclibase.HostPortfalse
enablebooleanfalse

codersdk.PrometheusConfig

{
  "address": {
    "host": "string",
    "port": "string"
  },
  "collect_agent_stats": true,
  "enable": true
}

Properties

NameTypeRequiredRestrictionsDescription
addressclibase.HostPortfalse
collect_agent_statsbooleanfalse
enablebooleanfalse

codersdk.ProvisionerConfig

{
  "daemon_poll_interval": 0,
  "daemon_poll_jitter": 0,
  "daemons": 0,
  "force_cancel_interval": 0
}

Properties

NameTypeRequiredRestrictionsDescription
daemon_poll_intervalintegerfalse
daemon_poll_jitterintegerfalse
daemonsintegerfalse
force_cancel_intervalintegerfalse

codersdk.ProvisionerDaemon

{
  "created_at": "2019-08-24T14:15:22Z",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "provisioners": ["string"],
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "updated_at": {
    "time": "string",
    "valid": true
  }
}

Properties

NameTypeRequiredRestrictionsDescription
created_atstringfalse
idstringfalse
namestringfalse
provisionersarray of stringfalse
tagsobjectfalse
» [any property]stringfalse
updated_atsql.NullTimefalse

codersdk.ProvisionerJob

{
  "canceled_at": "2019-08-24T14:15:22Z",
  "completed_at": "2019-08-24T14:15:22Z",
  "created_at": "2019-08-24T14:15:22Z",
  "error": "string",
  "error_code": "MISSING_TEMPLATE_PARAMETER",
  "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "started_at": "2019-08-24T14:15:22Z",
  "status": "pending",
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "worker_id": "ae5fa6f7-c55b-40c1-b40a-b36ac467652b"
}

Properties

NameTypeRequiredRestrictionsDescription
canceled_atstringfalse
completed_atstringfalse
created_atstringfalse
errorstringfalse
error_codecodersdk.JobErrorCodefalse
file_idstringfalse
idstringfalse
started_atstringfalse
statuscodersdk.ProvisionerJobStatusfalse
tagsobjectfalse
» [any property]stringfalse
worker_idstringfalse

Enumerated Values

PropertyValue
error_codeMISSING_TEMPLATE_PARAMETER
error_codeREQUIRED_TEMPLATE_VARIABLES
statuspending
statusrunning
statussucceeded
statuscanceling
statuscanceled
statusfailed

codersdk.ProvisionerJobLog

{
  "created_at": "2019-08-24T14:15:22Z",
  "id": 0,
  "log_level": "trace",
  "log_source": "provisioner_daemon",
  "output": "string",
  "stage": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
created_atstringfalse
idintegerfalse
log_levelcodersdk.LogLevelfalse
log_sourcecodersdk.LogSourcefalse
outputstringfalse
stagestringfalse

Enumerated Values

PropertyValue
log_leveltrace
log_leveldebug
log_levelinfo
log_levelwarn
log_levelerror

codersdk.ProvisionerJobStatus

"pending"

Properties

Enumerated Values

Value
pending
running
succeeded
canceling
canceled
failed

codersdk.ProvisionerLogLevel

"debug"

Properties

Enumerated Values

Value
debug

codersdk.ProvisionerStorageMethod

"file"

Properties

Enumerated Values

Value
file

codersdk.ProxyHealthReport

{
  "errors": ["string"],
  "warnings": ["string"]
}

Properties

NameTypeRequiredRestrictionsDescription
errorsarray of stringfalseErrors are problems that prevent the workspace proxy from being healthy
warningsarray of stringfalseWarnings do not prevent the workspace proxy from being healthy, but should be addressed.

codersdk.ProxyHealthStatus

"ok"

Properties

Enumerated Values

Value
ok
unreachable
unhealthy
unregistered

codersdk.PutExtendWorkspaceRequest

{
  "deadline": "2019-08-24T14:15:22Z"
}

Properties

NameTypeRequiredRestrictionsDescription
deadlinestringtrue

codersdk.RBACResource

"workspace"

Properties

Enumerated Values

Value
workspace
workspace_proxy
workspace_execution
application_connect
audit_log
template
group
file
provisioner_daemon
organization
assign_role
assign_org_role
api_key
user
user_data
organization_member
license
deployment_config
deployment_stats
replicas
debug_info
system

codersdk.RateLimitConfig

{
  "api": 0,
  "disable_all": true
}

Properties

NameTypeRequiredRestrictionsDescription
apiintegerfalse
disable_allbooleanfalse

codersdk.Region

{
  "display_name": "string",
  "healthy": true,
  "icon_url": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "path_app_url": "string",
  "wildcard_hostname": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
display_namestringfalse
healthybooleanfalse
icon_urlstringfalse
idstringfalse
namestringfalse
path_app_urlstringfalsePath app URL is the URL to the base path for path apps. Optional unless wildcard_hostname is set. E.g. https://us.example.com
wildcard_hostnamestringfalseWildcard hostname is the wildcard hostname for subdomain apps. E.g. _.us.example.com E.g. _--suffix.au.example.com Optional. Does not need to be on the same domain as PathAppURL.

codersdk.RegionsResponse

{
  "regions": [
    {
      "display_name": "string",
      "healthy": true,
      "icon_url": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "path_app_url": "string",
      "wildcard_hostname": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
regionsarray of codersdk.Regionfalse

codersdk.Replica

{
  "created_at": "2019-08-24T14:15:22Z",
  "database_latency": 0,
  "error": "string",
  "hostname": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "region_id": 0,
  "relay_address": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
created_atstringfalseCreated at is the timestamp when the replica was first seen.
database_latencyintegerfalseDatabase latency is the latency in microseconds to the database.
errorstringfalseError is the replica error.
hostnamestringfalseHostname is the hostname of the replica.
idstringfalseID is the unique identifier for the replica.
region_idintegerfalseRegion ID is the region of the replica.
relay_addressstringfalseRelay address is the accessible address to relay DERP connections.

codersdk.ResourceType

"template"

Properties

Enumerated Values

Value
template
template_version
user
workspace
workspace_build
git_ssh_key
api_key
group
license

codersdk.Response

{
  "detail": "string",
  "message": "string",
  "validations": [
    {
      "detail": "string",
      "field": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
detailstringfalseDetail is a debug message that provides further insight into why the action failed. This information can be technical and a regular golang err.Error() text. - "database: too many open connections" - "stat: too many open files"
messagestringfalseMessage is an actionable message that depicts actions the request took. These messages should be fully formed sentences with proper punctuation. Examples: - "A user has been created." - "Failed to create a user."
validationsarray of codersdk.ValidationErrorfalseValidations are form field-specific friendly error messages. They will be shown on a form field in the UI. These can also be used to add additional context if there is a set of errors in the primary 'Message'.

codersdk.Role

{
  "display_name": "string",
  "name": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
display_namestringfalse
namestringfalse

codersdk.SSHConfig

{
  "deploymentName": "string",
  "sshconfigOptions": ["string"]
}

Properties

NameTypeRequiredRestrictionsDescription
deploymentNamestringfalseDeploymentname is the config-ssh Hostname prefix
sshconfigOptionsarray of stringfalseSshconfigoptions are additional options to add to the ssh config file. This will override defaults.

codersdk.SSHConfigResponse

{
  "hostname_prefix": "string",
  "ssh_config_options": {
    "property1": "string",
    "property2": "string"
  }
}

Properties

NameTypeRequiredRestrictionsDescription
hostname_prefixstringfalse
ssh_config_optionsobjectfalse
» [any property]stringfalse

codersdk.ServiceBannerConfig

{
  "background_color": "string",
  "enabled": true,
  "message": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
background_colorstringfalse
enabledbooleanfalse
messagestringfalse

codersdk.SessionCountDeploymentStats

{
  "jetbrains": 0,
  "reconnecting_pty": 0,
  "ssh": 0,
  "vscode": 0
}

Properties

NameTypeRequiredRestrictionsDescription
jetbrainsintegerfalse
reconnecting_ptyintegerfalse
sshintegerfalse
vscodeintegerfalse

codersdk.SupportConfig

{
  "links": {
    "value": [
      {
        "icon": "string",
        "name": "string",
        "target": "string"
      }
    ]
  }
}

Properties

NameTypeRequiredRestrictionsDescription
linksclibase.Struct-array_codersdk_LinkConfigfalse

codersdk.SwaggerConfig

{
  "enable": true
}

Properties

NameTypeRequiredRestrictionsDescription
enablebooleanfalse

codersdk.TLSConfig

{
  "address": {
    "host": "string",
    "port": "string"
  },
  "cert_file": ["string"],
  "client_auth": "string",
  "client_ca_file": "string",
  "client_cert_file": "string",
  "client_key_file": "string",
  "enable": true,
  "key_file": ["string"],
  "min_version": "string",
  "redirect_http": true
}

Properties

NameTypeRequiredRestrictionsDescription
addressclibase.HostPortfalse
cert_filearray of stringfalse
client_authstringfalse
client_ca_filestringfalse
client_cert_filestringfalse
client_key_filestringfalse
enablebooleanfalse
key_filearray of stringfalse
min_versionstringfalse
redirect_httpbooleanfalse

codersdk.TelemetryConfig

{
  "enable": true,
  "trace": true,
  "url": {
    "forceQuery": true,
    "fragment": "string",
    "host": "string",
    "omitHost": true,
    "opaque": "string",
    "path": "string",
    "rawFragment": "string",
    "rawPath": "string",
    "rawQuery": "string",
    "scheme": "string",
    "user": {}
  }
}

Properties

NameTypeRequiredRestrictionsDescription
enablebooleanfalse
tracebooleanfalse
urlclibase.URLfalse

codersdk.Template

{
  "active_user_count": 0,
  "active_version_id": "eae64611-bd53-4a80-bb77-df1e432c0fbc",
  "allow_user_autostart": true,
  "allow_user_autostop": true,
  "allow_user_cancel_workspace_jobs": true,
  "build_time_stats": {
    "property1": {
      "p50": 123,
      "p95": 146
    },
    "property2": {
      "p50": 123,
      "p95": 146
    }
  },
  "created_at": "2019-08-24T14:15:22Z",
  "created_by_id": "9377d689-01fb-4abf-8450-3368d2c1924f",
  "created_by_name": "string",
  "default_ttl_ms": 0,
  "description": "string",
  "display_name": "string",
  "failure_ttl_ms": 0,
  "icon": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "inactivity_ttl_ms": 0,
  "max_ttl_ms": 0,
  "name": "string",
  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
  "provisioner": "terraform",
  "updated_at": "2019-08-24T14:15:22Z"
}

Properties

NameTypeRequiredRestrictionsDescription
active_user_countintegerfalseActive user count is set to -1 when loading.
active_version_idstringfalse
allow_user_autostartbooleanfalseAllow user autostart and AllowUserAutostop are enterprise-only. Their values are only used if your license is entitled to use the advanced template scheduling feature.
allow_user_autostopbooleanfalse
allow_user_cancel_workspace_jobsbooleanfalse
build_time_statscodersdk.TemplateBuildTimeStatsfalse
created_atstringfalse
created_by_idstringfalse
created_by_namestringfalse
default_ttl_msintegerfalse
descriptionstringfalse
display_namestringfalse
failure_ttl_msintegerfalseFailure ttl ms and InactivityTTLMillis are enterprise-only. Their values are used if your license is entitled to use the advanced template scheduling feature.
iconstringfalse
idstringfalse
inactivity_ttl_msintegerfalse
max_ttl_msintegerfalseMax ttl ms is an enterprise feature. It's value is only used if your license is entitled to use the advanced template scheduling feature.
namestringfalse
organization_idstringfalse
provisionerstringfalse
updated_atstringfalse

Enumerated Values

PropertyValue
provisionerterraform

codersdk.TemplateBuildTimeStats

{
  "property1": {
    "p50": 123,
    "p95": 146
  },
  "property2": {
    "p50": 123,
    "p95": 146
  }
}

Properties

NameTypeRequiredRestrictionsDescription
[any property]codersdk.TransitionStatsfalse

codersdk.TemplateExample

{
  "description": "string",
  "icon": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "markdown": "string",
  "name": "string",
  "tags": ["string"],
  "url": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
descriptionstringfalse
iconstringfalse
idstringfalse
markdownstringfalse
namestringfalse
tagsarray of stringfalse
urlstringfalse

codersdk.TemplateRole

"admin"

Properties

Enumerated Values

Value
admin
use
``

codersdk.TemplateUser

{
  "avatar_url": "http://example.com",
  "created_at": "2019-08-24T14:15:22Z",
  "email": "[email protected]",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "last_seen_at": "2019-08-24T14:15:22Z",
  "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
  "role": "admin",
  "roles": [
    {
      "display_name": "string",
      "name": "string"
    }
  ],
  "status": "active",
  "username": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
avatar_urlstringfalse
created_atstringtrue
emailstringtrue
idstringtrue
last_seen_atstringfalse
organization_idsarray of stringfalse
rolecodersdk.TemplateRolefalse
rolesarray of codersdk.Rolefalse
statuscodersdk.UserStatusfalse
usernamestringtrue

Enumerated Values

PropertyValue
roleadmin
roleuse
statusactive
statussuspended

codersdk.TemplateVersion

{
  "created_at": "2019-08-24T14:15:22Z",
  "created_by": {
    "avatar_url": "http://example.com",
    "created_at": "2019-08-24T14:15:22Z",
    "email": "[email protected]",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "last_seen_at": "2019-08-24T14:15:22Z",
    "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
    "roles": [
      {
        "display_name": "string",
        "name": "string"
      }
    ],
    "status": "active",
    "username": "string"
  },
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "job": {
    "canceled_at": "2019-08-24T14:15:22Z",
    "completed_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "error": "string",
    "error_code": "MISSING_TEMPLATE_PARAMETER",
    "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "started_at": "2019-08-24T14:15:22Z",
    "status": "pending",
    "tags": {
      "property1": "string",
      "property2": "string"
    },
    "worker_id": "ae5fa6f7-c55b-40c1-b40a-b36ac467652b"
  },
  "name": "string",
  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
  "readme": "string",
  "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",
  "updated_at": "2019-08-24T14:15:22Z",
  "warnings": ["UNSUPPORTED_WORKSPACES"]
}

Properties

NameTypeRequiredRestrictionsDescription
created_atstringfalse
created_bycodersdk.Userfalse
idstringfalse
jobcodersdk.ProvisionerJobfalse
namestringfalse
organization_idstringfalse
readmestringfalse
template_idstringfalse
updated_atstringfalse
warningsarray of codersdk.TemplateVersionWarningfalse

codersdk.TemplateVersionGitAuth

{
  "authenticate_url": "string",
  "authenticated": true,
  "id": "string",
  "type": "azure-devops"
}

Properties

NameTypeRequiredRestrictionsDescription
authenticate_urlstringfalse
authenticatedbooleanfalse
idstringfalse
typecodersdk.GitProviderfalse

codersdk.TemplateVersionParameter

{
  "default_value": "string",
  "description": "string",
  "description_plaintext": "string",
  "display_name": "string",
  "icon": "string",
  "legacy_variable_name": "string",
  "mutable": true,
  "name": "string",
  "options": [
    {
      "description": "string",
      "icon": "string",
      "name": "string",
      "value": "string"
    }
  ],
  "required": true,
  "type": "string",
  "validation_error": "string",
  "validation_max": 0,
  "validation_min": 0,
  "validation_monotonic": "increasing",
  "validation_regex": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
default_valuestringfalse
descriptionstringfalse
description_plaintextstringfalse
display_namestringfalse
iconstringfalse
legacy_variable_namestringfalse
mutablebooleanfalse
namestringfalse
optionsarray of codersdk.TemplateVersionParameterOptionfalse
requiredbooleanfalse
typestringfalse
validation_errorstringfalse
validation_maxintegerfalse
validation_minintegerfalse
validation_monotoniccodersdk.ValidationMonotonicOrderfalse
validation_regexstringfalse

Enumerated Values

PropertyValue
typestring
typenumber
typebool
typelist(string)
validation_monotonicincreasing
validation_monotonicdecreasing

codersdk.TemplateVersionParameterOption

{
  "description": "string",
  "icon": "string",
  "name": "string",
  "value": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
descriptionstringfalse
iconstringfalse
namestringfalse
valuestringfalse

codersdk.TemplateVersionVariable

{
  "default_value": "string",
  "description": "string",
  "name": "string",
  "required": true,
  "sensitive": true,
  "type": "string",
  "value": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
default_valuestringfalse
descriptionstringfalse
namestringfalse
requiredbooleanfalse
sensitivebooleanfalse
typestringfalse
valuestringfalse

Enumerated Values

PropertyValue
typestring
typenumber
typebool

codersdk.TemplateVersionWarning

"UNSUPPORTED_WORKSPACES"

Properties

Enumerated Values

Value
UNSUPPORTED_WORKSPACES

codersdk.TokenConfig

{
  "max_token_lifetime": 0
}

Properties

NameTypeRequiredRestrictionsDescription
max_token_lifetimeintegerfalse

codersdk.TraceConfig

{
  "capture_logs": true,
  "enable": true,
  "honeycomb_api_key": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
capture_logsbooleanfalse
enablebooleanfalse
honeycomb_api_keystringfalse

codersdk.TransitionStats

{
  "p50": 123,
  "p95": 146
}

Properties

NameTypeRequiredRestrictionsDescription
p50integerfalse
p95integerfalse

codersdk.UpdateActiveTemplateVersion

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

Properties

NameTypeRequiredRestrictionsDescription
idstringtrue

codersdk.UpdateAppearanceConfig

{
  "logo_url": "string",
  "service_banner": {
    "background_color": "string",
    "enabled": true,
    "message": "string"
  }
}

Properties

NameTypeRequiredRestrictionsDescription
logo_urlstringfalse
service_bannercodersdk.ServiceBannerConfigfalse

codersdk.UpdateCheckResponse

{
  "current": true,
  "url": "string",
  "version": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
currentbooleanfalseCurrent indicates whether the server version is the same as the latest.
urlstringfalseURL to download the latest release of Coder.
versionstringfalseVersion is the semantic version for the latest release of Coder.

codersdk.UpdateRoles

{
  "roles": ["string"]
}

Properties

NameTypeRequiredRestrictionsDescription
rolesarray of stringfalse

codersdk.UpdateTemplateACL

{
  "group_perms": {
    "property1": "admin",
    "property2": "admin"
  },
  "user_perms": {
    "property1": "admin",
    "property2": "admin"
  }
}

Properties

NameTypeRequiredRestrictionsDescription
group_permsobjectfalse
» [any property]codersdk.TemplateRolefalse
user_permsobjectfalse
» [any property]codersdk.TemplateRolefalse

codersdk.UpdateUserPasswordRequest

{
  "old_password": "string",
  "password": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
old_passwordstringfalse
passwordstringtrue

codersdk.UpdateUserProfileRequest

{
  "username": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
usernamestringtrue

codersdk.UpdateWorkspaceAutostartRequest

{
  "schedule": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
schedulestringfalse

codersdk.UpdateWorkspaceRequest

{
  "name": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
namestringfalse

codersdk.UpdateWorkspaceTTLRequest

{
  "ttl_ms": 0
}

Properties

NameTypeRequiredRestrictionsDescription
ttl_msintegerfalse

codersdk.UploadResponse

{
  "hash": "19686d84-b10d-4f90-b18e-84fd3fa038fd"
}

Properties

NameTypeRequiredRestrictionsDescription
hashstringfalse

codersdk.User

{
  "avatar_url": "http://example.com",
  "created_at": "2019-08-24T14:15:22Z",
  "email": "[email protected]",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "last_seen_at": "2019-08-24T14:15:22Z",
  "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
  "roles": [
    {
      "display_name": "string",
      "name": "string"
    }
  ],
  "status": "active",
  "username": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
avatar_urlstringfalse
created_atstringtrue
emailstringtrue
idstringtrue
last_seen_atstringfalse
organization_idsarray of stringfalse
rolesarray of codersdk.Rolefalse
statuscodersdk.UserStatusfalse
usernamestringtrue

Enumerated Values

PropertyValue
statusactive
statussuspended

codersdk.UserStatus

"active"

Properties

Enumerated Values

Value
active
suspended

codersdk.ValidationError

{
  "detail": "string",
  "field": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
detailstringtrue
fieldstringtrue

codersdk.ValidationMonotonicOrder

"increasing"

Properties

Enumerated Values

Value
increasing
decreasing

codersdk.VariableValue

{
  "name": "string",
  "value": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
namestringfalse
valuestringfalse

codersdk.Workspace

{
  "autostart_schedule": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "deleting_at": "2019-08-24T14:15:22Z",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "last_used_at": "2019-08-24T14:15:22Z",
  "latest_build": {
    "build_number": 0,
    "created_at": "2019-08-24T14:15:22Z",
    "daily_cost": 0,
    "deadline": "2019-08-24T14:15:22Z",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "initiator_id": "06588898-9a84-4b35-ba8f-f9cbd64946f3",
    "initiator_name": "string",
    "job": {
      "canceled_at": "2019-08-24T14:15:22Z",
      "completed_at": "2019-08-24T14:15:22Z",
      "created_at": "2019-08-24T14:15:22Z",
      "error": "string",
      "error_code": "MISSING_TEMPLATE_PARAMETER",
      "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "started_at": "2019-08-24T14:15:22Z",
      "status": "pending",
      "tags": {
        "property1": "string",
        "property2": "string"
      },
      "worker_id": "ae5fa6f7-c55b-40c1-b40a-b36ac467652b"
    },
    "max_deadline": "2019-08-24T14:15:22Z",
    "reason": "initiator",
    "resources": [
      {
        "agents": [
          {
            "apps": [
              {
                "command": "string",
                "display_name": "string",
                "external": true,
                "health": "disabled",
                "healthcheck": {
                  "interval": 0,
                  "threshold": 0,
                  "url": "string"
                },
                "icon": "string",
                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                "sharing_level": "owner",
                "slug": "string",
                "subdomain": true,
                "url": "string"
              }
            ],
            "architecture": "string",
            "connection_timeout_seconds": 0,
            "created_at": "2019-08-24T14:15:22Z",
            "directory": "string",
            "disconnected_at": "2019-08-24T14:15:22Z",
            "environment_variables": {
              "property1": "string",
              "property2": "string"
            },
            "expanded_directory": "string",
            "first_connected_at": "2019-08-24T14:15:22Z",
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "instance_id": "string",
            "last_connected_at": "2019-08-24T14:15:22Z",
            "latency": {
              "property1": {
                "latency_ms": 0,
                "preferred": true
              },
              "property2": {
                "latency_ms": 0,
                "preferred": true
              }
            },
            "lifecycle_state": "created",
            "login_before_ready": true,
            "name": "string",
            "operating_system": "string",
            "resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
            "shutdown_script": "string",
            "shutdown_script_timeout_seconds": 0,
            "startup_logs_length": 0,
            "startup_logs_overflowed": true,
            "startup_script": "string",
            "startup_script_timeout_seconds": 0,
            "status": "connecting",
            "subsystem": "envbox",
            "troubleshooting_url": "string",
            "updated_at": "2019-08-24T14:15:22Z",
            "version": "string"
          }
        ],
        "created_at": "2019-08-24T14:15:22Z",
        "daily_cost": 0,
        "hide": true,
        "icon": "string",
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f",
        "metadata": [
          {
            "key": "string",
            "sensitive": true,
            "value": "string"
          }
        ],
        "name": "string",
        "type": "string",
        "workspace_transition": "start"
      }
    ],
    "status": "pending",
    "template_version_id": "0ba39c92-1f1b-4c32-aa3e-9925d7713eb1",
    "template_version_name": "string",
    "transition": "start",
    "updated_at": "2019-08-24T14:15:22Z",
    "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",
    "workspace_name": "string",
    "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7",
    "workspace_owner_name": "string"
  },
  "name": "string",
  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
  "outdated": true,
  "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05",
  "owner_name": "string",
  "template_allow_user_cancel_workspace_jobs": true,
  "template_display_name": "string",
  "template_icon": "string",
  "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",
  "template_name": "string",
  "ttl_ms": 0,
  "updated_at": "2019-08-24T14:15:22Z"
}

Properties

NameTypeRequiredRestrictionsDescription
autostart_schedulestringfalse
created_atstringfalse
deleting_atstringfalseDeleting at indicates the time of the upcoming workspace deletion, if applicable; otherwise it is nil. Workspaces may have impending deletions if Template.InactivityTTL feature is turned on and the workspace is inactive.
idstringfalse
last_used_atstringfalse
latest_buildcodersdk.WorkspaceBuildfalse
namestringfalse
organization_idstringfalse
outdatedbooleanfalse
owner_idstringfalse
owner_namestringfalse
template_allow_user_cancel_workspace_jobsbooleanfalse
template_display_namestringfalse
template_iconstringfalse
template_idstringfalse
template_namestringfalse
ttl_msintegerfalse
updated_atstringfalse

codersdk.WorkspaceAgent

{
  "apps": [
    {
      "command": "string",
      "display_name": "string",
      "external": true,
      "health": "disabled",
      "healthcheck": {
        "interval": 0,
        "threshold": 0,
        "url": "string"
      },
      "icon": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "sharing_level": "owner",
      "slug": "string",
      "subdomain": true,
      "url": "string"
    }
  ],
  "architecture": "string",
  "connection_timeout_seconds": 0,
  "created_at": "2019-08-24T14:15:22Z",
  "directory": "string",
  "disconnected_at": "2019-08-24T14:15:22Z",
  "environment_variables": {
    "property1": "string",
    "property2": "string"
  },
  "expanded_directory": "string",
  "first_connected_at": "2019-08-24T14:15:22Z",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "instance_id": "string",
  "last_connected_at": "2019-08-24T14:15:22Z",
  "latency": {
    "property1": {
      "latency_ms": 0,
      "preferred": true
    },
    "property2": {
      "latency_ms": 0,
      "preferred": true
    }
  },
  "lifecycle_state": "created",
  "login_before_ready": true,
  "name": "string",
  "operating_system": "string",
  "resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
  "shutdown_script": "string",
  "shutdown_script_timeout_seconds": 0,
  "startup_logs_length": 0,
  "startup_logs_overflowed": true,
  "startup_script": "string",
  "startup_script_timeout_seconds": 0,
  "status": "connecting",
  "subsystem": "envbox",
  "troubleshooting_url": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "version": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
appsarray of codersdk.WorkspaceAppfalse
architecturestringfalse
connection_timeout_secondsintegerfalse
created_atstringfalse
directorystringfalse
disconnected_atstringfalse
environment_variablesobjectfalse
» [any property]stringfalse
expanded_directorystringfalse
first_connected_atstringfalse
idstringfalse
instance_idstringfalse
last_connected_atstringfalse
latencyobjectfalseLatency is mapped by region name (e.g. "New York City", "Seattle").
» [any property]codersdk.DERPRegionfalse
lifecycle_statecodersdk.WorkspaceAgentLifecyclefalse
login_before_readybooleanfalseLogin before ready if true, the agent will delay logins until it is ready (e.g. executing startup script has ended).
namestringfalse
operating_systemstringfalse
resource_idstringfalse
shutdown_scriptstringfalse
shutdown_script_timeout_secondsintegerfalse
startup_logs_lengthintegerfalse
startup_logs_overflowedbooleanfalse
startup_scriptstringfalse
startup_script_timeout_secondsintegerfalseStartup script timeout seconds is the number of seconds to wait for the startup script to complete. If the script does not complete within this time, the agent lifecycle will be marked as start_timeout.
statuscodersdk.WorkspaceAgentStatusfalse
subsystemcodersdk.AgentSubsystemfalse
troubleshooting_urlstringfalse
updated_atstringfalse
versionstringfalse

codersdk.WorkspaceAgentConnectionInfo

{
  "derp_map": {
    "omitDefaultRegions": true,
    "regions": {
      "property1": {
        "avoid": true,
        "embeddedRelay": true,
        "nodes": [
          {
            "certName": "string",
            "derpport": 0,
            "forceHTTP": true,
            "hostName": "string",
            "insecureForTests": true,
            "ipv4": "string",
            "ipv6": "string",
            "name": "string",
            "regionID": 0,
            "stunonly": true,
            "stunport": 0,
            "stuntestIP": "string"
          }
        ],
        "regionCode": "string",
        "regionID": 0,
        "regionName": "string"
      },
      "property2": {
        "avoid": true,
        "embeddedRelay": true,
        "nodes": [
          {
            "certName": "string",
            "derpport": 0,
            "forceHTTP": true,
            "hostName": "string",
            "insecureForTests": true,
            "ipv4": "string",
            "ipv6": "string",
            "name": "string",
            "regionID": 0,
            "stunonly": true,
            "stunport": 0,
            "stuntestIP": "string"
          }
        ],
        "regionCode": "string",
        "regionID": 0,
        "regionName": "string"
      }
    }
  }
}

Properties

NameTypeRequiredRestrictionsDescription
derp_maptailcfg.DERPMapfalse

codersdk.WorkspaceAgentLifecycle

"created"

Properties

Enumerated Values

Value
created
starting
start_timeout
start_error
ready
shutting_down
shutdown_timeout
shutdown_error
off

codersdk.WorkspaceAgentListeningPort

{
  "network": "string",
  "port": 0,
  "process_name": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
networkstringfalseonly "tcp" at the moment
portintegerfalse
process_namestringfalsemay be empty

codersdk.WorkspaceAgentListeningPortsResponse

{
  "ports": [
    {
      "network": "string",
      "port": 0,
      "process_name": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
portsarray of codersdk.WorkspaceAgentListeningPortfalseIf there are no ports in the list, nothing should be displayed in the UI. There must not be a "no ports available" message or anything similar, as there will always be no ports displayed on platforms where our port detection logic is unsupported.

codersdk.WorkspaceAgentMetadataDescription

{
  "display_name": "string",
  "interval": 0,
  "key": "string",
  "script": "string",
  "timeout": 0
}

Properties

NameTypeRequiredRestrictionsDescription
display_namestringfalse
intervalintegerfalse
keystringfalse
scriptstringfalse
timeoutintegerfalse

codersdk.WorkspaceAgentStartupLog

{
  "created_at": "2019-08-24T14:15:22Z",
  "id": 0,
  "level": "trace",
  "output": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
created_atstringfalse
idintegerfalse
levelcodersdk.LogLevelfalse
outputstringfalse

codersdk.WorkspaceAgentStatus

"connecting"

Properties

Enumerated Values

Value
connecting
connected
disconnected
timeout

codersdk.WorkspaceApp

{
  "command": "string",
  "display_name": "string",
  "external": true,
  "health": "disabled",
  "healthcheck": {
    "interval": 0,
    "threshold": 0,
    "url": "string"
  },
  "icon": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "sharing_level": "owner",
  "slug": "string",
  "subdomain": true,
  "url": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
commandstringfalse
display_namestringfalseDisplay name is a friendly name for the app.
externalbooleanfalseExternal specifies whether the URL should be opened externally on the client or not.
healthcodersdk.WorkspaceAppHealthfalse
healthcheckcodersdk.HealthcheckfalseHealthcheck specifies the configuration for checking app health.
iconstringfalseIcon is a relative path or external URL that specifies an icon to be displayed in the dashboard.
idstringfalse
sharing_levelcodersdk.WorkspaceAppSharingLevelfalse
slugstringfalseSlug is a unique identifier within the agent.
subdomainbooleanfalseSubdomain 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.
urlstringfalseURL is the address being proxied to inside the workspace. If external is specified, this will be opened on the client.

Enumerated Values

PropertyValue
sharing_levelowner
sharing_levelauthenticated
sharing_levelpublic

codersdk.WorkspaceAppHealth

"disabled"

Properties

Enumerated Values

Value
disabled
initializing
healthy
unhealthy

codersdk.WorkspaceAppSharingLevel

"owner"

Properties

Enumerated Values

Value
owner
authenticated
public

codersdk.WorkspaceBuild

{
  "build_number": 0,
  "created_at": "2019-08-24T14:15:22Z",
  "daily_cost": 0,
  "deadline": "2019-08-24T14:15:22Z",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "initiator_id": "06588898-9a84-4b35-ba8f-f9cbd64946f3",
  "initiator_name": "string",
  "job": {
    "canceled_at": "2019-08-24T14:15:22Z",
    "completed_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "error": "string",
    "error_code": "MISSING_TEMPLATE_PARAMETER",
    "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "started_at": "2019-08-24T14:15:22Z",
    "status": "pending",
    "tags": {
      "property1": "string",
      "property2": "string"
    },
    "worker_id": "ae5fa6f7-c55b-40c1-b40a-b36ac467652b"
  },
  "max_deadline": "2019-08-24T14:15:22Z",
  "reason": "initiator",
  "resources": [
    {
      "agents": [
        {
          "apps": [
            {
              "command": "string",
              "display_name": "string",
              "external": true,
              "health": "disabled",
              "healthcheck": {
                "interval": 0,
                "threshold": 0,
                "url": "string"
              },
              "icon": "string",
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              "sharing_level": "owner",
              "slug": "string",
              "subdomain": true,
              "url": "string"
            }
          ],
          "architecture": "string",
          "connection_timeout_seconds": 0,
          "created_at": "2019-08-24T14:15:22Z",
          "directory": "string",
          "disconnected_at": "2019-08-24T14:15:22Z",
          "environment_variables": {
            "property1": "string",
            "property2": "string"
          },
          "expanded_directory": "string",
          "first_connected_at": "2019-08-24T14:15:22Z",
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "instance_id": "string",
          "last_connected_at": "2019-08-24T14:15:22Z",
          "latency": {
            "property1": {
              "latency_ms": 0,
              "preferred": true
            },
            "property2": {
              "latency_ms": 0,
              "preferred": true
            }
          },
          "lifecycle_state": "created",
          "login_before_ready": true,
          "name": "string",
          "operating_system": "string",
          "resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
          "shutdown_script": "string",
          "shutdown_script_timeout_seconds": 0,
          "startup_logs_length": 0,
          "startup_logs_overflowed": true,
          "startup_script": "string",
          "startup_script_timeout_seconds": 0,
          "status": "connecting",
          "subsystem": "envbox",
          "troubleshooting_url": "string",
          "updated_at": "2019-08-24T14:15:22Z",
          "version": "string"
        }
      ],
      "created_at": "2019-08-24T14:15:22Z",
      "daily_cost": 0,
      "hide": true,
      "icon": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f",
      "metadata": [
        {
          "key": "string",
          "sensitive": true,
          "value": "string"
        }
      ],
      "name": "string",
      "type": "string",
      "workspace_transition": "start"
    }
  ],
  "status": "pending",
  "template_version_id": "0ba39c92-1f1b-4c32-aa3e-9925d7713eb1",
  "template_version_name": "string",
  "transition": "start",
  "updated_at": "2019-08-24T14:15:22Z",
  "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",
  "workspace_name": "string",
  "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7",
  "workspace_owner_name": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
build_numberintegerfalse
created_atstringfalse
daily_costintegerfalse
deadlinestringfalse
idstringfalse
initiator_idstringfalse
initiator_namestringfalse
jobcodersdk.ProvisionerJobfalse
max_deadlinestringfalse
reasoncodersdk.BuildReasonfalse
resourcesarray of codersdk.WorkspaceResourcefalse
statuscodersdk.WorkspaceStatusfalse
template_version_idstringfalse
template_version_namestringfalse
transitioncodersdk.WorkspaceTransitionfalse
updated_atstringfalse
workspace_idstringfalse
workspace_namestringfalse
workspace_owner_idstringfalse
workspace_owner_namestringfalse

Enumerated Values

PropertyValue
reasoninitiator
reasonautostart
reasonautostop
statuspending
statusstarting
statusrunning
statusstopping
statusstopped
statusfailed
statuscanceling
statuscanceled
statusdeleting
statusdeleted
transitionstart
transitionstop
transitiondelete

codersdk.WorkspaceBuildParameter

{
  "name": "string",
  "value": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
namestringfalse
valuestringfalse

codersdk.WorkspaceConnectionLatencyMS

{
  "p50": 0,
  "p95": 0
}

Properties

NameTypeRequiredRestrictionsDescription
p50numberfalse
p95numberfalse

codersdk.WorkspaceDeploymentStats

{
  "building": 0,
  "connection_latency_ms": {
    "p50": 0,
    "p95": 0
  },
  "failed": 0,
  "pending": 0,
  "running": 0,
  "rx_bytes": 0,
  "stopped": 0,
  "tx_bytes": 0
}

Properties

NameTypeRequiredRestrictionsDescription
buildingintegerfalse
connection_latency_mscodersdk.WorkspaceConnectionLatencyMSfalse
failedintegerfalse
pendingintegerfalse
runningintegerfalse
rx_bytesintegerfalse
stoppedintegerfalse
tx_bytesintegerfalse

codersdk.WorkspaceProxy

{
  "created_at": "2019-08-24T14:15:22Z",
  "deleted": true,
  "display_name": "string",
  "icon": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "status": {
    "checked_at": "2019-08-24T14:15:22Z",
    "report": {
      "errors": ["string"],
      "warnings": ["string"]
    },
    "status": "ok"
  },
  "updated_at": "2019-08-24T14:15:22Z",
  "url": "string",
  "wildcard_hostname": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
created_atstringfalse
deletedbooleanfalse
display_namestringfalse
iconstringfalse
idstringfalse
namestringfalse
statuscodersdk.WorkspaceProxyStatusfalseStatus is the latest status check of the proxy. This will be empty for deleted proxies. This value can be used to determine if a workspace proxy is healthy and ready to use.
updated_atstringfalse
urlstringfalseFull URL including scheme of the proxy api url: https://us.example.com
wildcard_hostnamestringfalseWildcard hostname with the wildcard for subdomain based app hosting: *.us.example.com

codersdk.WorkspaceProxyStatus

{
  "checked_at": "2019-08-24T14:15:22Z",
  "report": {
    "errors": ["string"],
    "warnings": ["string"]
  },
  "status": "ok"
}

Properties

NameTypeRequiredRestrictionsDescription
checked_atstringfalse
reportcodersdk.ProxyHealthReportfalseReport provides more information about the health of the workspace proxy.
statuscodersdk.ProxyHealthStatusfalse

codersdk.WorkspaceQuota

{
  "budget": 0,
  "credits_consumed": 0
}

Properties

NameTypeRequiredRestrictionsDescription
budgetintegerfalse
credits_consumedintegerfalse

codersdk.WorkspaceResource

{
  "agents": [
    {
      "apps": [
        {
          "command": "string",
          "display_name": "string",
          "external": true,
          "health": "disabled",
          "healthcheck": {
            "interval": 0,
            "threshold": 0,
            "url": "string"
          },
          "icon": "string",
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "sharing_level": "owner",
          "slug": "string",
          "subdomain": true,
          "url": "string"
        }
      ],
      "architecture": "string",
      "connection_timeout_seconds": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "directory": "string",
      "disconnected_at": "2019-08-24T14:15:22Z",
      "environment_variables": {
        "property1": "string",
        "property2": "string"
      },
      "expanded_directory": "string",
      "first_connected_at": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "instance_id": "string",
      "last_connected_at": "2019-08-24T14:15:22Z",
      "latency": {
        "property1": {
          "latency_ms": 0,
          "preferred": true
        },
        "property2": {
          "latency_ms": 0,
          "preferred": true
        }
      },
      "lifecycle_state": "created",
      "login_before_ready": true,
      "name": "string",
      "operating_system": "string",
      "resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
      "shutdown_script": "string",
      "shutdown_script_timeout_seconds": 0,
      "startup_logs_length": 0,
      "startup_logs_overflowed": true,
      "startup_script": "string",
      "startup_script_timeout_seconds": 0,
      "status": "connecting",
      "subsystem": "envbox",
      "troubleshooting_url": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "version": "string"
    }
  ],
  "created_at": "2019-08-24T14:15:22Z",
  "daily_cost": 0,
  "hide": true,
  "icon": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "job_id": "453b