Adds the missing swagger annotations for the eight organization-scoped
MCP server config routes introduced in #27942 and checks in the
regenerated API artifacts (`coderd/apidoc`, `docs/reference/api`). No
behavior changes: 58 hand-written annotation lines, the rest is
generated output.
## Stack context
Part of the MCP org-separation stack (CODAGT-711 org scope -> apidocs ->
hardening -> CODAGT-717 audit -> CODAGT-712 ACLs -> CODAGT-806 token
RBAC). Split out of #27942 to keep the core cutover reviewable; these
routes live under `/api/experimental`, where main already ships several
MCP handlers without annotations, so the base PR is consistent with
existing precedent until this lands.
Closes nothing on its own; documentation completion for CODAGT-711.
> Mux (AI agent) authored this PR on Mike's behalf.
<!-- mux-attribution: model=claude-fable-5 thinking=high -->
ID is a unique identifier for the log source. It is scoped to a workspace agent, and can be statically defined inside code to prevent duplicate sources from being created for the same agent.
Deprecated: Use Providers with indexed CODER_AI_GATEWAY_PROVIDER_<N>_* env vars instead.
api_dump_dir
string
false
Api dump dir is the base directory under which each provider's request/response dumps are written, in a subdirectory named after the provider. Empty disables dumping.
Providers holds provider instances populated from CODER_AI_GATEWAY_PROVIDER_<N>_<KEY> env vars and/or the deprecated LegacyOpenAI/LegacyAnthropic/LegacyBedrock fields above.
Network calls summarizes the Agent Firewall network requests made during the session. A nil value means the session did not pass through Agent Firewall, so network call monitoring was not active, which the UI surfaces as "Disabled".
Network call logs is the chronological list of individual network calls made during the session, holding the earliest calls up to a server-side cap. NetworkCalls remains authoritative for whole-session totals, so a shorter list than NetworkCalls.Total means the list was truncated. Empty when the session did not pass through Agent Firewall.
Network calls summarizes the Agent Firewall network calls made during the session. A nil value means the session did not pass through Agent Firewall, so network call monitoring was not active, which the UI surfaces as "Disabled".
Network top domains lists the most contacted destination hosts, ordered by call count descending. NetworkDomainCount is the total number of distinct domains, used to render a "+N more" overflow beyond the listed domains.
Agent firewall sequence number is the firewall sequence number from the root interception. Used to determine the position of this LLM request in the firewall event stream. Nil when the request did not pass through the agent firewall.
agent_firewall_session_id
string
false
Agent firewall session ID links this thread to an agent firewall confinement session. Nil when the request did not pass through the agent firewall.
Error message is the raw terminal upstream error message from the root interception. Nil when the interception succeeded.
error_type
string
false
Error type is the categorized terminal upstream error from the root interception, or nil when the interception succeeded. See the aibridge_interception_error_type enum for possible values.
Object can represent a "set" of objects, such as: all workspaces in an organization, all workspaces owned by me, and all workspaces across the entire product. When defining an object, use the most specific language when possible to produce the smallest set. Meaning to set as many fields on 'Object' as you can. Example, if you want to check if you can update all workspaces owned by 'me', try to also add an 'OrganizationID' to the settings. Omitting the 'OrganizationID' could produce the incorrect value, as workspaces have both user and organization owners.
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
Name
Type
Required
Restrictions
Description
any_org
boolean
false
Any org (optional) will disregard the org_owner when checking for permissions. This cannot be set to true if the OrganizationID is set.
organization_id
string
false
Organization ID (optional) adds the set constraint to all resources owned by a given organization.
owner_id
string
false
Owner ID (optional) adds the set constraint to all resources owned by a given user.
resource_id
string
false
Resource 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.
Checks 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.
Agent api version is the current version of the Agent API (back versions MAY still be supported).
dashboard_url
string
false
Dashboard URL is the URL to hit the deployment's dashboard. For external workspace proxies, this is the coderd they are connected to.
deployment_id
string
false
Deployment ID is the unique identifier for this deployment.
external_url
string
false
External URL references the current Coder version. For production builds, this will link directly to a release. For development builds, this will link to a commit.
provisioner_api_version
string
false
Provisioner api version is the current version of the Provisioner API
telemetry
boolean
false
Telemetry is a boolean that indicates whether telemetry is enabled.
upgrade_message
string
false
Upgrade message is the message displayed to users when an outdated client is detected.
version
string
false
Version returns the semantic version of the build.
webpush_public_key
string
false
Webpush public key is the public key for push notifications via Web Push.
Children holds child (subagent) chats nested under this root chat. Always initialized to an empty slice so the JSON field is present as []. Child chats cannot create their own subagents, so nesting depth is capped at 1 and this slice is always empty for child chats.
Context reports the chat's pinned workspace-context state and whether it has drifted from the agent's latest pushed snapshot. Nil when the chat has no pinned context yet.
Resources is the chat's pinned context (instruction files and skills) the prompt is built from, metadata only (no bodies). It is populated only on the single-chat GET response; list and watch payloads leave it nil to stay lightweight.
Skill name and SkillDescription are populated only for skill kinds.
source
string
false
Source is the resource locator: the canonical file path for an instruction file, the skill directory for a skill, the file path for an MCP config, or the server name for an MCP server.
Status is the resource's health. Non-ok resources (invalid, unreadable, oversize, excluded) are still reported so the UI can surface why a resource was dropped from the prompt instead of silently omitting it; their body-specific fields (skill name, tools) are empty.
How many members are in this group. Shows the total count, even if the user is not authorized to read group member details. May be greater than len(Group.Members).
Completed at is the time a reasoning part finished streaming, so reasoning duration can be computed as completed_at minus created_at. For interrupted reasoning, this is the interruption time. Absent when reasoning timestamp data was not recorded (e.g. messages persisted before this feature was added).
content
string
false
The code content from the diff that was commented on.
Context file agent ID is the workspace agent that provided this context file. Used to detect when the agent changes (e.g. workspace rebuilt) so instruction files can be re-persisted with fresh content.
context_file_content
string
false
Context file content holds the file content sent to the LLM. Internal only: stripped before API responses to keep payloads small. The backend reads it when building the prompt via partsToMessageParts.
context_file_directory
string
false
Context file directory is the working directory of the workspace agent. Internal only: same purpose as ContextFileOS.
context_file_os
string
false
Context file os is the operating system of the workspace agent. Internal only: used during prompt expansion so the LLM knows the OS even on turns where InsertSystem is not called.
context_file_path
string
false
Context file path is the absolute path of a file loaded into the LLM context (e.g. an AGENTS.md instruction file).
context_file_skill_meta_file
string
false
Context file skill meta file is the basename of the skill meta file (e.g. "SKILL.md") at the time of persistence. Internal only: restored on subsequent turns so the read_skill tool uses the correct filename even when the agent configured a non-default value.
context_file_truncated
boolean
false
Context file truncated indicates the file exceeded the 64KiB instruction file limit and was truncated.
created_at
string
false
Created at is the timestamp this part carries. The semantics depend on the part type: for tool-call and tool-result parts it is the time the call was emitted or the result was produced (tool duration is the result's created_at minus the call's created_at); for reasoning parts it is the time reasoning started streaming.
Parsed commands holds parsed programs from an execute tool call's shell command, one entry per simple command in source order. Each entry is [program] or [program, arg] where arg is the first non-flag positional argument. Program names are normalized to their base name (e.g. /usr/bin/go becomes go). Only populated when ToolName is "execute" and the command parses successfully; nil otherwise.
provider_executed
boolean
false
Provider executed indicates the tool call was executed by the provider (e.g. Anthropic computer use).
provider_metadata
array of integer
false
Provider metadata holds provider-specific response metadata (e.g. Anthropic cache control hints) as raw JSON. Internal only: stripped by db2sdk before API responses.
result
array of integer
false
result_delta
string
false
result_reset
boolean
false
skill_description
string
false
Skill description is the short description from the skill's SKILL.md frontmatter.
skill_dir
string
false
Skill dir is the absolute path to the skill directory inside the workspace filesystem. Internal only: used by read_skill/read_skill_file tools to locate skill files.
skill_name
string
false
Skill name is the kebab-case name of a discovered skill from the workspace's .agents/skills/ directory.
Messages contains all user-visible messages inserted by the send, in insertion order. A queued send on an errored chat may promote the previous queue head, so clients must upsert the full batch.
Activity bump ms allows optionally specifying the activity bump duration for all workspaces created from this template. Defaults to 1h but can be set to 0 to disable activity bumping.
agents_allowed
boolean
false
Agents allowed controls whether Coder Agents can create workspaces using this template. Defaults to true.
allow_user_autostart
boolean
false
Allow 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_autostop
boolean
false
Allow 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_jobs
boolean
false
Allow users to cancel in-progress workspace jobs. *bool as the default value is "true".
Autostart requirement allows optionally specifying the autostart allowed days for workspaces created from this template. This is an enterprise feature.
Cors behavior allows optionally specifying the CORS behavior for all shared ports.
default_ttl_ms
integer
false
Default ttl ms allows optionally specifying the default TTL for all workspaces created from this template.
delete_ttl_ms
integer
false
Delete ttl ms allows optionally specifying the max lifetime before Coder permanently deletes dormant workspaces created from this template.
description
string
false
Description is a description of what the template contains. It must be less than 128 bytes.
disable_everyone_group_access
boolean
false
Disable everyone group access allows optionally disabling the default behavior of granting the 'everyone' group access to use the template. If this is set to true, the template will not be available to all users, and must be explicitly granted to users or groups in the permissions settings of the template.
display_name
string
false
Display name is the displayed name of the template.
dormant_ttl_ms
integer
false
Dormant ttl ms allows optionally specifying the max lifetime before Coder locks inactive workspaces created from this template.
failure_ttl_ms
integer
false
Failure ttl ms allows optionally specifying the max lifetime before Coder stops all resources for failed workspaces created from this template.
icon
string
false
Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard.
Max port share level allows optionally specifying the maximum port share level for workspaces created from the template.
name
string
true
Name is the name of the template.
require_active_version
boolean
false
Require active version mandates that workspaces are built with the active template version.
template_use_classic_parameter_flow
boolean
false
Template use classic parameter flow allows optionally specifying whether the template should use the classic parameter flow. The default if unset is true, and is why *bool is used here. When dynamic parameters becomes the default, this will default to false.
template_version_id
string
true
Template 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.
time_til_autostop_notify_ms
integer
false
Time til autostop notify ms allows optionally specifying the duration before the autostop deadline at which a reminder notification is sent for workspaces created from this template. Defaults to 0 (disabled).
Content must be SKILL.md-format Markdown with YAML frontmatter. The frontmatter must include name, may include description, and must be followed by a non-empty body.
Rich parameter values are applied to the child build. Parameters not listed here fall back to their values from the previous build, matching normal build behavior.
template_version_id
string
false
Template version ID pins the child build to a specific template version. Pinning requires permission to update the template, since the active version may change before the child build runs. When empty, the child build uses the template's active version at the time it runs.
template_version_preset_id
string
false
Template version preset ID selects a preset for the child build. It requires TemplateVersionID to also be set.
On success queues a follow-up workspace build after this build succeeds. It currently supports restarting a workspace by starting it after a successful stop build.
Rich parameter values are optional. It will write params to the 'workspace' scope. This will overwrite any existing parameters with the same name. This will not delete old params not included in this list.
state
array of integer
false
template_version_id
string
false
template_version_preset_id
string
false
Template version preset ID is the ID of the template version preset to use for the build.
CreateWorkspaceRequest provides options for creating a new workspace. Only one of TemplateID or TemplateVersionID can be specified, not both. If TemplateID is specified, the active version of the template will be used. Workspace names: - Must start with a letter or number - Can only contain letters, numbers, and hyphens - Cannot contain spaces or special characters - Cannot be named new or create - Must be unique within your workspaces - Maximum length of 32 characters
Model config ID when set, overrides the model used for the replacement user message and the assistant turn that follows. When nil the original message's model is preserved.
Deleted message ids holds the IDs of previously visible messages the edit removed, including stale hook notices from the edited turn. Clients should drop them from local caches.
Messages holds every user-visible message inserted by the edit, in insertion order. Hook-generated suffix messages may follow Message, so clients must upsert the full batch.
Api base URL is the base URL for provider REST API calls (e.g., "https://api.github.com" for GitHub). Derived from defaults when not explicitly configured.
app_install_url
string
false
app_installations_url
string
false
auth_url
string
false
client_id
string
false
code_challenge_methods_supported
array of string
false
Code challenge methods supported lists the PKCE code challenge methods The only one supported by Coder is "S256".
device_code_url
string
false
device_flow
boolean
false
display_icon
string
false
Display icon is a URL to an icon to display in the UI.
display_name
string
false
Display name is shown in the UI to identify the auth config.
id
string
false
ID is a unique identifier for the auth config. It defaults to type when not provided.
mcp_tool_allow_regex
string
false
Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.
mcp_tool_deny_regex
string
false
Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.
mcp_url
string
false
Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.
no_refresh
boolean
false
redirect_url
string
false
Redirect URL is optional, defaulting to 'ACCESS_URL'. Only useful in niche situations where the OAuth callback domain is different from the ACCESS_URL domain. The path component is ignored.
regex
string
false
Regex allows API requesters to match an auth config by a string (e.g. coder.com) instead of by it's type.
Git clone makes use of this by parsing the URL from: 'Username for "https://github.com":' And sending it to the Coder server to match against the Regex.
Actual is the usage measured against Limit, when known: a point-in-time count for most features, or usage accumulated over UsagePeriod for features that set one. Its unit matches Limit's; FeatureAgentRuntimeHours reports whole hours floored from the recorded milliseconds, with the precise value available in ActualMs. FeatureAgentRuntimeHours usage can trail by roughly one hour because the current hour is not emitted, plus the entitlement refresh interval.
actual_ms
integer
false
Actual ms is the precise usage backing Actual, in milliseconds, for features measured in time. It has the same freshness as Actual. Only FeatureAgentRuntimeHours sets this field.
Hard limit is the enforcement threshold that accompanies Limit for features whose license carries it. See SoftLimit for the set of features that use these thresholds.
limit
integer
false
Limit is the maximum value the license grants for the feature, in the feature's own unit. For FeatureAgentRuntimeHours, an enabled feature with Limit omitted means the license grants unlimited runtime hours.
soft_limit
integer
false
Soft limit is the advisory warning threshold that accompanies Limit for features whose license carries it. For these features, Limit carries the purchased allocation; an unlimited allocation has no thresholds, so SoftLimit is omitted alongside the omitted Limit. Only FeatureAgentRuntimeHours sets this field.
Usage period denotes that the usage is a counter that accumulates over this period (and most likely resets with the issuance of the next license). These dates are determined from the license that this entitlement comes from, see enterprise/coderd/license/license.go. Only FeatureManagedAgentLimit and FeatureAgentRuntimeHours set this field.
Public key is the SSH public key in OpenSSH format. Example: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID3OmYJvT7q1cF1azbybYy0OZ9yrXfA+M6Lr4vzX5zlp\n" Note: The key includes a trailing newline (\n).
How many members are in this group. Shows the total count, even if the user is not authorized to read group member details. May be greater than len(Group.Members).
Current spend micros is the group's spend over the current budget period.
group_id
string
false
period_end
string
false
Period end is the exclusive upper bound of the current budget period.
period_start
string
false
Period start is the inclusive lower bound of the current budget period.
spend_limit_micros
integer
false
Spend limit micros is the group's configured AI spend budget per member. Null when the group has no configured budget.
total_spend_limit_micros
integer
false
Total spend limit micros is the currently configured combined budget of the members attributed to this group, with each member's override replacing their share. Null when the group has no budget, and zero when no members are attributed to it.
Effective group ID is the user's effective budget group within the queried group's organization, falling back to the Everyone group when no budget applies. Null when the effective group belongs to a different organization than the queried group.
Group budget is the budget when the queried group is this user's effective budget source. Null when the user's budget resolves to another group or no budget applies to the user.
group_spend_micros
integer
false
Group spend micros is the user's spend attributed to the queried group over the current budget period.
Auto create missing groups controls whether groups returned by the OIDC provider are automatically created in Coder if they are missing.
field
string
false
Field is the name of the claim field that specifies what groups a user should be in. If empty, no groups will be synced.
legacy_group_name_mapping
object
false
Legacy group name mapping is deprecated. It remaps an IDP group name to a Coder group name. Since configuration is now done at runtime, group IDs are used to account for group renames. For legacy configurations, this config option has to remain. Deprecated: Use Mapping instead.
» [any property]
string
false
mapping
object
false
Mapping is a map from OIDC groups to Coder group IDs
Regex filter is a regular expression that filters the groups returned by the OIDC provider. Any group not matched by this regex will be ignored. If the group filter is nil, then no group filtering will occur.
Claims 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.
Forward coder headers forwards the same Coder identity headers we send to LLM providers (X-Coder-Owner-Id, X-Coder-Chat-Id, and the optional X-Coder-Subchat-Id and X-Coder-Workspace-Id) to this MCP server on every request. Off by default to avoid leaking chat identity to third-party servers.
has_api_key
boolean
false
has_custom_headers
boolean
false
has_oauth2_secret
boolean
false
icon_url
string
false
id
string
false
model_intent
boolean
false
oauth2_auth_url
string
false
oauth2_client_id
string
false
Oauth2 client ID fields (only populated for admins).
Available is the number of provisioner daemons that are available to take jobs. This may be less than the count if some provisioners are busy or have been stopped.
count
integer
false
Count is the number of provisioner daemons that matched the given tags. If the count is 0, it means no provisioner daemons matched the requested tags.
most_recently_seen
string
false
Most recently seen is the most recently seen time of the set of matched provisioners. If no provisioners matched, this field will be null.
How many notifications a notifier should lease per fetch interval.
lease_period
integer
false
How long a notifier should lease a message. This is effectively how long a notification is 'owned' by a notifier, and once this period expires it will be available for lease by another notifier. Leasing is important in order for multiple running notifiers to not pick the same messages to deliver concurrently. This lease period will only expire if a notifier shuts down ungracefully; a dispatch of the notification releases the lease.
max_send_attempts
integer
false
The upper limit of attempts to send a notification.
method
string
false
Which delivery method to use (available options: 'smtp', 'webhook').
retry_interval
integer
false
The minimum time between retries.
sync_buffer_size
integer
false
The notifications system buffers message updates in memory to ease pressure on the database. This option controls how many updates are kept in memory. The lower this value the lower the change of state inconsistency in a non-graceful shutdown - but it also increases load on the database. It is recommended to keep this option at its default value.
sync_interval
integer
false
The notifications system buffers message updates in memory to ease pressure on the database. This option controls how often it synchronizes its state with the database. The shorter this value the lower the change of state inconsistency in a non-graceful shutdown - but it also increases load on the database. It is recommended to keep this option at its default value.
Endpoints are included in the app response for easier discovery. The OAuth2 spec does not have a defined place to find these (for comparison, OIDC has a '/.well-known/openid-configuration' endpoint).
Claims are the merged claims from the OIDC provider. These are the union of the ID token claims and the userinfo claims, where userinfo claims take precedence on conflict.
Client key file & ClientCertFile are used in place of ClientSecret for PKI auth.
client_secret
string
false
email_domain
array of string
false
email_fallback
boolean
false
Email fallback allows OIDC logins to fall back to email-based matching when the linked_id (issuer+subject) does not match an existing user link. INSECURE: weakens the linked_id check. It exists for IdP brokers that do not issue a stable sub for the same user across connections.
Ignore user info & UserInfoFromAccessToken are mutually exclusive. Only 1 can be set to true. Ideally this would be an enum with 3 states, ['none', 'userinfo', 'access_token']. However, for backward compatibility, ignore_user_info must remain. And access_token is a niche, non-spec compliant edge case. So it's use is rare, and should not be advised.
issuer_url
string
false
name_field
string
false
organization_assign_default
boolean
false
organization_field
string
false
organization_mapping
object
false
redirect_allowed_hosts
array of string
false
Redirect allowed hosts is an allowlist of hostnames that may be used as the host of the OIDC redirect_uri. When non-empty, the redirect_uri is constructed from the incoming request's Host header (validated against this list) instead of from AccessURL. Every listed host must also be registered as a valid redirect URI in the OIDC provider. This setting is mutually exclusive with RedirectURL: if RedirectURL is set, this allowlist is ignored.
Redirect URL is optional, defaulting to 'ACCESS_URL'. Only useful in niche situations where the OIDC callback domain is different from the ACCESS_URL domain. The path component is ignored.
scopes
array of string
false
sign_in_text
string
false
signups_disabled_text
string
false
skip_issuer_checks
boolean
false
source_user_info_from_access_token
boolean
false
Source user info from access token as mentioned above is an edge case. This allows sourcing the user_info from the access token itself instead of a user_info endpoint. This assumes the access token is a valid JWT with a set of claims to be merged with the id_token.
Current spend micros is the group's spend over the current budget period.
group_id
string
false
spend_limit_micros
integer
false
Spend limit micros is the group's configured AI spend budget per member. Null when the group has no configured budget.
total_spend_limit_micros
integer
false
Total spend limit micros is the currently configured combined budget of the members attributed to this group, with each member's override replacing their share. Null when the group has no budget, and zero when no members are attributed to it.
Field selects the claim field to be used as the created user's organizations. If the field is the empty string, then no organization updates will ever come from the OIDC provider.
mapping
object
false
Mapping maps from an OIDC claim --> Coder organization uuid
» [any property]
array of string
false
organization_assign_default
boolean
false
Organization assign default will ensure the default org is always included for every user, regardless of their claims. This preserves legacy behavior.
Total member count is the number of members in the group, shown even when the caller cannot read individual members. The roster itself is not returned by this endpoint.
{"workspace_build":{"build_number":0,"created_at":"2019-08-24T14:15:22Z","daily_cost":0,"deadline":"2019-08-24T14:15:22Z","has_ai_task":true,"has_external_agent":true,"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","initiator_id":"06588898-9a84-4b35-ba8f-f9cbd64946f3","initiator_name":"string","job":{"available_workers":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"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":"REQUIRED_TEMPLATE_VARIABLES","file_id":"8a0cfb4f-ddc9-436d-91bb-75133c583767","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","initiator_id":"06588898-9a84-4b35-ba8f-f9cbd64946f3","input":{"error":"string","template_version_id":"0ba39c92-1f1b-4c32-aa3e-9925d7713eb1","workspace_build_id":"badaf2eb-96c5-4050-9f1d-db2d39ca5478"},"logs_overflowed":true,"metadata":{"template_display_name":"string","template_icon":"string","template_id":"c6d67e98-83ea-49f0-8812-e4abae2b68bc","template_name":"string","template_version_name":"string","workspace_build_transition":"start","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9","workspace_name":"string"},"organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","queue_position":0,"queue_size":0,"started_at":"2019-08-24T14:15:22Z","status":"pending","tags":{"property1":"string","property2":"string"},"type":"template_version_import","worker_id":"ae5fa6f7-c55b-40c1-b40a-b36ac467652b","worker_name":"string"},"matched_provisioners":{"available":0,"count":0,"most_recently_seen":"2019-08-24T14:15:22Z"},"max_deadline":"2019-08-24T14:15:22Z","reason":"initiator","resources":[{"agents":[{"api_version":"string","apps":[{"command":"string","display_name":"string","external":true,"group":"string","health":"disabled","healthcheck":{"interval":0,"threshold":0,"url":"string"},"hidden":true,"icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","open_in":"slim-window","sharing_level":"owner","slug":"string","statuses":[{"agent_id":"2b1e3b65-2c04-4fa2-a2d7-467901e98978","app_id":"affd1d10-9538-4fc8-9e0b-4594a28c1335","created_at":"2019-08-24T14:15:22Z","icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","message":"string","needs_user_attention":true,"state":"working","uri":"string","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9"}],"subdomain":true,"subdomain_name":"string","tooltip":"string","url":"string"}],"architecture":"string","connection_timeout_seconds":0,"created_at":"2019-08-24T14:15:22Z","directory":"string","disconnected_at":"2019-08-24T14:15:22Z","display_apps":["vscode"],"environment_variables":{"property1":"string","property2":"string"},"expanded_directory":"string","first_connected_at":"2019-08-24T14:15:22Z","health":{"healthy":false,"reason":"agent has lost connection"},"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","log_sources":[{"created_at":"2019-08-24T14:15:22Z","display_name":"string","icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","workspace_agent_id":"7ad2e618-fea7-4c1a-b70a-f501566a72f1"}],"logs_length":0,"logs_overflowed":true,"metadata":[{"description":{"display_name":"string","interval":0,"key":"string","script":"string","timeout":0},"result":{"age":0,"collected_at":"2019-08-24T14:15:22Z","error":"string","value":"string"}}],"name":"string","operating_system":"string","parent_id":{"uuid":"string","valid":true},"ready_at":"2019-08-24T14:15:22Z","resource_id":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","scripts":[{"cron":"string","display_name":"string","exit_code":0,"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","log_path":"string","log_source_id":"4197ab25-95cf-4b91-9c78-f7f2af5d353a","run_on_start":true,"run_on_stop":true,"script":"string","start_blocks_login":true,"status":"ok","timeout":0}],"started_at":"2019-08-24T14:15:22Z","startup_script_behavior":"blocking","status":"connecting","subsystems":["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","template_version_preset_id":"512a53a7-30da-446e-a1fc-713c630baff1","transition":"start","updated_at":"2019-08-24T14:15:22Z","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9","workspace_name":"string","workspace_owner_avatar_url":"string","workspace_owner_id":"e7078695-5279-4c86-8774-3ac2367a2fc7","workspace_owner_name":"string"}}
Failure hard limit defines the maximum number of consecutive failed prebuild attempts allowed before a preset is considered to be in a hard limit state. When a preset hits this limit, no new prebuilds will be created until the limit is reset. FailureHardLimit is disabled when set to zero.
reconciliation_backoff_interval
integer
false
Reconciliation backoff interval specifies the amount of time to increase the backoff interval when errors occur during reconciliation.
reconciliation_backoff_lookback
integer
false
Reconciliation backoff lookback determines the time window to look back when calculating the number of failed prebuilds, which influences the backoff strategy.
reconciliation_interval
integer
false
Reconciliation interval defines how often the workspace prebuilds state should be reconciled.
Path 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_hostname
string
false
Wildcard 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.
Detail 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"
message
string
false
Message 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."
Validations 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.ResumeTaskResponse
{"workspace_build":{"build_number":0,"created_at":"2019-08-24T14:15:22Z","daily_cost":0,"deadline":"2019-08-24T14:15:22Z","has_ai_task":true,"has_external_agent":true,"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","initiator_id":"06588898-9a84-4b35-ba8f-f9cbd64946f3","initiator_name":"string","job":{"available_workers":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"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":"REQUIRED_TEMPLATE_VARIABLES","file_id":"8a0cfb4f-ddc9-436d-91bb-75133c583767","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","initiator_id":"06588898-9a84-4b35-ba8f-f9cbd64946f3","input":{"error":"string","template_version_id":"0ba39c92-1f1b-4c32-aa3e-9925d7713eb1","workspace_build_id":"badaf2eb-96c5-4050-9f1d-db2d39ca5478"},"logs_overflowed":true,"metadata":{"template_display_name":"string","template_icon":"string","template_id":"c6d67e98-83ea-49f0-8812-e4abae2b68bc","template_name":"string","template_version_name":"string","workspace_build_transition":"start","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9","workspace_name":"string"},"organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","queue_position":0,"queue_size":0,"started_at":"2019-08-24T14:15:22Z","status":"pending","tags":{"property1":"string","property2":"string"},"type":"template_version_import","worker_id":"ae5fa6f7-c55b-40c1-b40a-b36ac467652b","worker_name":"string"},"matched_provisioners":{"available":0,"count":0,"most_recently_seen":"2019-08-24T14:15:22Z"},"max_deadline":"2019-08-24T14:15:22Z","reason":"initiator","resources":[{"agents":[{"api_version":"string","apps":[{"command":"string","display_name":"string","external":true,"group":"string","health":"disabled","healthcheck":{"interval":0,"threshold":0,"url":"string"},"hidden":true,"icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","open_in":"slim-window","sharing_level":"owner","slug":"string","statuses":[{"agent_id":"2b1e3b65-2c04-4fa2-a2d7-467901e98978","app_id":"affd1d10-9538-4fc8-9e0b-4594a28c1335","created_at":"2019-08-24T14:15:22Z","icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","message":"string","needs_user_attention":true,"state":"working","uri":"string","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9"}],"subdomain":true,"subdomain_name":"string","tooltip":"string","url":"string"}],"architecture":"string","connection_timeout_seconds":0,"created_at":"2019-08-24T14:15:22Z","directory":"string","disconnected_at":"2019-08-24T14:15:22Z","display_apps":["vscode"],"environment_variables":{"property1":"string","property2":"string"},"expanded_directory":"string","first_connected_at":"2019-08-24T14:15:22Z","health":{"healthy":false,"reason":"agent has lost connection"},"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","log_sources":[{"created_at":"2019-08-24T14:15:22Z","display_name":"string","icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","workspace_agent_id":"7ad2e618-fea7-4c1a-b70a-f501566a72f1"}],"logs_length":0,"logs_overflowed":true,"metadata":[{"description":{"display_name":"string","interval":0,"key":"string","script":"string","timeout":0},"result":{"age":0,"collected_at":"2019-08-24T14:15:22Z","error":"string","value":"string"}}],"name":"string","operating_system":"string","parent_id":{"uuid":"string","valid":true},"ready_at":"2019-08-24T14:15:22Z","resource_id":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","scripts":[{"cron":"string","display_name":"string","exit_code":0,"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","log_path":"string","log_source_id":"4197ab25-95cf-4b91-9c78-f7f2af5d353a","run_on_start":true,"run_on_stop":true,"script":"string","start_blocks_login":true,"status":"ok","timeout":0}],"started_at":"2019-08-24T14:15:22Z","startup_script_behavior":"blocking","status":"connecting","subsystems":["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","template_version_preset_id":"512a53a7-30da-446e-a1fc-713c630baff1","transition":"start","updated_at":"2019-08-24T14:15:22Z","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9","workspace_name":"string","workspace_owner_avatar_url":"string","workspace_owner_id":"e7078695-5279-4c86-8774-3ac2367a2fc7","workspace_owner_name":"string"}}
Api keys controls how long expired API keys are retained before being deleted. Keys are only deleted if they have been expired for at least this duration. Defaults to 7 days to preserve existing behavior.
audit_logs
integer
false
Audit logs controls how long audit log entries are retained. Set to 0 to disable (keep indefinitely).
boundary_logs
integer
false
Boundary logs controls how long boundary audit log entries are retained. Boundary logs record every HTTP request processed by a Boundary confinement proxy. Set to 0 to disable automatic deletion (keep indefinitely). Adjust to match your organization's regulatory requirements.
connection_logs
integer
false
Connection logs controls how long connection log entries are retained. Set to 0 to disable (keep indefinitely).
workspace_agent_logs
integer
false
Workspace agent logs controls how long workspace agent logs are retained. Logs are deleted if the agent hasn't connected within this period. Logs from the latest build are always retained regardless of age. Defaults to 7 days to preserve existing behavior.
Default duration is only for browser, workspace app and oauth sessions.
default_token_lifetime
integer
false
disable_expiry_refresh
boolean
false
Disable expiry refresh will disable automatically refreshing api keys when they are used from the api. This means the api key lifetime at creation is the lifetime of the api key.
max_admin_token_lifetime
integer
false
max_token_lifetime
integer
false
refresh_default_duration
integer
false
Refresh default duration is the default lifetime for OAuth2 refresh tokens. This should generally be longer than access token lifetimes to allow refreshing after access token expiry.
{"created_at":"2019-08-24T14:15:22Z","current_state":{"message":"string","state":"working","timestamp":"2019-08-24T14:15:22Z","uri":"string"},"display_name":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","initial_prompt":"string","name":"string","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","owner_avatar_url":"string","owner_id":"8826ee2e-7933-4665-aef2-2393f84a0d05","owner_name":"string","status":"pending","template_display_name":"string","template_icon":"string","template_id":"c6d67e98-83ea-49f0-8812-e4abae2b68bc","template_name":"string","template_version_id":"0ba39c92-1f1b-4c32-aa3e-9925d7713eb1","updated_at":"2019-08-24T14:15:22Z","workspace_agent_health":{"healthy":false,"reason":"agent has lost connection"},"workspace_agent_id":{"uuid":"string","valid":true},"workspace_agent_lifecycle":"created","workspace_app_id":{"uuid":"string","valid":true},"workspace_build_number":0,"workspace_id":{"uuid":"string","valid":true},"workspace_name":"string","workspace_status":"pending"}
{"count":0,"tasks":[{"created_at":"2019-08-24T14:15:22Z","current_state":{"message":"string","state":"working","timestamp":"2019-08-24T14:15:22Z","uri":"string"},"display_name":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","initial_prompt":"string","name":"string","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","owner_avatar_url":"string","owner_id":"8826ee2e-7933-4665-aef2-2393f84a0d05","owner_name":"string","status":"pending","template_display_name":"string","template_icon":"string","template_id":"c6d67e98-83ea-49f0-8812-e4abae2b68bc","template_name":"string","template_version_id":"0ba39c92-1f1b-4c32-aa3e-9925d7713eb1","updated_at":"2019-08-24T14:15:22Z","workspace_agent_health":{"healthy":false,"reason":"agent has lost connection"},"workspace_agent_id":{"uuid":"string","valid":true},"workspace_agent_lifecycle":"created","workspace_app_id":{"uuid":"string","valid":true},"workspace_build_number":0,"workspace_id":{"uuid":"string","valid":true},"workspace_name":"string","workspace_status":"pending"}]}
Allow user autostart and AllowUserAutostop are enterprise-only. Their values are only used if your license is entitled to use the advanced template scheduling feature.
Autostop requirement and AutostartRequirement are enterprise features. Its value is only used if your license is entitled to use the advanced template scheduling feature.
Disable module cache disables the use of cached Terraform modules during provisioning.
display_name
string
false
failure_ttl_ms
integer
false
Failure ttl ms TimeTilDormantMillis, and TimeTilDormantAutoDeleteMillis are enterprise-only. Their values are used if your license is entitled to use the advanced template scheduling feature.
Require active version mandates that workspaces are built with the active template version.
time_til_autostop_notify_ms
integer
false
Time til autostop notify ms is the duration before the workspace's autostop deadline at which a reminder notification is sent. 0 disables the notification.
{"display_name":"Visual Studio Code","icon":"string","seconds":80500,"slug":"vscode","template_ids":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"times_used":2,"type":"builtin"}
Days of week is a list of days of the week in which autostart is allowed to happen. If no days are specified, autostart is not allowed.
codersdk.TemplateAutostopRequirement
{"days_of_week":["monday"],"weeks":0}
Properties
Name
Type
Required
Restrictions
Description
days_of_week
array of string
false
Days of week is a list of days of the week on which restarts are required. Restarts happen within the user's quiet hours (in their configured timezone). If no days are specified, restarts are not required. Weekdays cannot be specified twice.
Restarts will only happen on weekdays in this list on weeks which line up with Weeks.
weeks
integer
false
Weeks is the number of weeks between required restarts. Weeks are synced across all workspaces (and Coder deployments) using modulo math on a hardcoded epoch week of January 2nd, 2023 (the first Monday of 2023). Values of 0 or 1 indicate weekly restarts. Values of 2 indicate fortnightly restarts, etc.
How many members are in this group. Shows the total count, even if the user is not authorized to read group member details. May be greater than len(Group.Members).
{"active_users":22,"apps_usage":[{"display_name":"Visual Studio Code","icon":"string","seconds":80500,"slug":"vscode","template_ids":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"times_used":2,"type":"builtin"}],"end_time":"2019-08-24T14:15:22Z","parameters_usage":[{"description":"string","display_name":"string","name":"string","options":[{"description":"string","icon":"string","name":"string","value":"string"}],"template_ids":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"type":"string","values":[{"count":0,"value":"string"}]}],"start_time":"2019-08-24T14:15:22Z","template_ids":["497f6eca-6276-4993-bfeb-53cbbbba6f08"]}
{"interval_reports":[{"active_users":14,"end_time":"2019-08-24T14:15:22Z","interval":"week","start_time":"2019-08-24T14:15:22Z","template_ids":["497f6eca-6276-4993-bfeb-53cbbbba6f08"]}],"report":{"active_users":22,"apps_usage":[{"display_name":"Visual Studio Code","icon":"string","seconds":80500,"slug":"vscode","template_ids":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"times_used":2,"type":"builtin"}],"end_time":"2019-08-24T14:15:22Z","parameters_usage":[{"description":"string","display_name":"string","name":"string","options":[{"description":"string","icon":"string","name":"string","value":"string"}],"template_ids":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"type":"string","values":[{"count":0,"value":"string"}]}],"start_time":"2019-08-24T14:15:22Z","template_ids":["497f6eca-6276-4993-bfeb-53cbbbba6f08"]}}
Pin order controls the chat's pinned state and position. - nil: no change to pin state. - 0: unpin the chat. - >0 (chat is unpinned): pin the chat, appending it to the end of the pinned list. The specific value is ignored; the server assigns the next available position. - >0 (chat is already pinned): move the chat to the requested position, shifting neighbors as needed. The value is clamped to [1, pinned_count].
Group perms is a mapping from valid group UUIDs to the template role they should be granted. To remove a group from the template, use "" as the role (available as a constant named codersdk.TemplateRoleDeleted)
User perms is a mapping from valid user UUIDs to the template role they should be granted. To remove a user from the template, use "" as the role (available as a constant named codersdk.TemplateRoleDeleted)
Activity bump ms allows optionally specifying the activity bump duration for all workspaces created from this template. Defaults to 1h but can be set to 0 to disable activity bumping.
agents_allowed
boolean
false
Agents allowed controls whether Coder Agents can create workspaces using this template. If omitted, the current value is preserved.
Autostop requirement and AutostartRequirement can only be set if your license includes the advanced template scheduling feature. If you attempt to set this value while unlicensed, it will be ignored.
Deprecation message if set, will mark the template as deprecated and block any new workspaces from using this template. If passed an empty string, will remove the deprecated message, making the template usable for new workspaces again.
description
string
false
disable_everyone_group_access
boolean
false
Disable everyone group access allows optionally disabling the default behavior of granting the 'everyone' group access to use the template. If this is set to true, the template will not be available to all users, and must be explicitly granted to users or groups in the permissions settings of the template.
disable_module_cache
boolean
false
Disable module cache disables the using of cached Terraform modules during provisioning. It is recommended not to disable this.
Require active version mandates workspaces built using this template use the active version of the template. This option has no effect on template admins.
time_til_autostop_notify_ms
integer
false
Time til autostop notify ms allows optionally specifying the duration before the autostop deadline at which a reminder notification is sent for workspaces created from this template. Defaults to 0 (disabled). Omitting the field keeps the existing value.
time_til_dormant_autodelete_ms
integer
false
time_til_dormant_ms
integer
false
update_workspace_dormant_at
boolean
false
Update workspace dormant at updates the dormant_at field of workspaces spawned from the template. This is useful for preventing dormant workspaces being immediately deleted when updating the dormant_ttl field to a new, shorter value.
update_workspace_last_used_at
boolean
false
Update workspace last used at updates the last_used_at field of workspaces spawned from the template. This is useful for preventing workspaces being immediately locked when updating the inactivity_ttl field to a new, shorter value.
use_classic_parameter_flow
boolean
false
Use classic parameter flow is a flag that switches the default behavior to use the classic parameter flow when creating a workspace. This only affects deployments with the experiment "dynamic-parameters" enabled. This setting will live for a period after the experiment is made the default. An "opt-out" is present in case the new feature breaks some existing templates.
Theme dark is required when ThemeMode is "sync". In "single" mode an empty value means "preserve the previously persisted slot" rather than "clear the slot", so partial updates that send only one slot keep the other intact.
theme_light
string
false
Theme light is required when ThemeMode is "sync". In "single" mode an empty value means "preserve the previously persisted slot" rather than "clear the slot", so partial updates that send only one slot keep the other intact.
Theme mode is optional for backward compatibility. When empty, the server leaves theme_mode, theme_light, and theme_dark unchanged so older CLI clients do not erase sync-mode settings. Legacy auto preferences are the exception: they clear theme_mode so clients can migrate the old sync-with-system setting.
Avatar URL is only applied for users whose login type is password or none. For other login types the avatar is synced from the identity provider on login, so a submitted value is ignored.
name
string
false
username
string
true
codersdk.UpdateUserQuietHoursScheduleRequest
{"schedule":"string"}
Properties
Name
Type
Required
Restrictions
Description
schedule
string
true
Schedule is a cron expression that defines when the user's quiet hours window is. Schedule must not be empty. For new users, the schedule is set to 2am in their browser or computer's timezone. The schedule denotes the beginning of a 4 hour window where the workspace is allowed to automatically stop or restart due to maintenance or template schedule.
The schedule must be daily with a single time, and should have a timezone specified via a CRON_TZ prefix (otherwise UTC will be used).
If the schedule is empty, the user will be updated to use the default schedule.
Content must be SKILL.md-format Markdown with YAML frontmatter. The frontmatter must include name, may include description, and must be followed by a non-empty body.
Group roles is a mapping from valid group UUIDs to the workspace role they should be granted. To remove a group from the workspace, use "" as the role (available as a constant named codersdk.WorkspaceRoleDeleted)
User roles is a mapping from valid user UUIDs to the workspace role they should be granted. To remove a user from the workspace, use "" as the role (available as a constant named codersdk.WorkspaceRoleDeleted)
Schedule is expected to be of the form CRON_TZ=<IANA Timezone> <min> <hour> * * <dow> Example: CRON_TZ=US/Central 30 9 * * 1-5 represents 0930 in the timezone US/Central on weekdays (Mon-Fri). CRON_TZ defaults to UTC if not present.
Effective budget is the spend limit that applies to the user, whether it came from a group budget or a user override. Null when no budget applies, leaving the user's spend unlimited.
effective_group_id
string
false
Effective group ID is the group the spend is attributed to, falling back to the Everyone group when no budget applies. Null only when the user has no organization membership.
period_end
string
false
Period end is the exclusive upper bound of the current budget period.
period_start
string
false
Period start is the inclusive lower bound of the current budget period.
Theme preference is the legacy single-field appearance setting. In "single" mode it mirrors the active theme. In "sync" mode modern clients normally mirror the active OS slot, but older clients can update only this field, so it may diverge from ThemeLight or ThemeDark until a modern client saves the full appearance state again.
Next is the next time that the quiet hours window will start.
raw_schedule
string
false
time
string
false
Time is the time of day that the quiet hours window starts in the given Timezone each day.
timezone
string
false
raw format from the cron expression, UTC if unspecified
user_can_set
boolean
false
User can set is true if the user is allowed to set their own quiet hours schedule. If false, the user cannot set a custom schedule and the default schedule will always be used.
user_set
boolean
false
User set is true if the user has set their own quiet hours schedule. If false, the user is using the default schedule.
Enabled controls whether the secret is injected into workspaces. Disabled secrets remain visible and editable, but are not added to the agent manifest, so they are not exposed as environment variables or written to secret files.
{"allow_renames":true,"automatic_updates":"always","autostart_schedule":"string","created_at":"2019-08-24T14:15:22Z","deleting_at":"2019-08-24T14:15:22Z","dormant_at":"2019-08-24T14:15:22Z","favorite":true,"health":{"failing_agents":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"healthy":false},"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","is_prebuild":true,"last_used_at":"2019-08-24T14:15:22Z","latest_app_status":{"agent_id":"2b1e3b65-2c04-4fa2-a2d7-467901e98978","app_id":"affd1d10-9538-4fc8-9e0b-4594a28c1335","created_at":"2019-08-24T14:15:22Z","icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","message":"string","needs_user_attention":true,"state":"working","uri":"string","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9"},"latest_build":{"build_number":0,"created_at":"2019-08-24T14:15:22Z","daily_cost":0,"deadline":"2019-08-24T14:15:22Z","has_ai_task":true,"has_external_agent":true,"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","initiator_id":"06588898-9a84-4b35-ba8f-f9cbd64946f3","initiator_name":"string","job":{"available_workers":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"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":"REQUIRED_TEMPLATE_VARIABLES","file_id":"8a0cfb4f-ddc9-436d-91bb-75133c583767","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","initiator_id":"06588898-9a84-4b35-ba8f-f9cbd64946f3","input":{"error":"string","template_version_id":"0ba39c92-1f1b-4c32-aa3e-9925d7713eb1","workspace_build_id":"badaf2eb-96c5-4050-9f1d-db2d39ca5478"},"logs_overflowed":true,"metadata":{"template_display_name":"string","template_icon":"string","template_id":"c6d67e98-83ea-49f0-8812-e4abae2b68bc","template_name":"string","template_version_name":"string","workspace_build_transition":"start","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9","workspace_name":"string"},"organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","queue_position":0,"queue_size":0,"started_at":"2019-08-24T14:15:22Z","status":"pending","tags":{"property1":"string","property2":"string"},"type":"template_version_import","worker_id":"ae5fa6f7-c55b-40c1-b40a-b36ac467652b","worker_name":"string"},"matched_provisioners":{"available":0,"count":0,"most_recently_seen":"2019-08-24T14:15:22Z"},"max_deadline":"2019-08-24T14:15:22Z","reason":"initiator","resources":[{"agents":[{"api_version":"string","apps":[{"command":"string","display_name":"string","external":true,"group":"string","health":"disabled","healthcheck":{"interval":0,"threshold":0,"url":"string"},"hidden":true,"icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","open_in":"slim-window","sharing_level":"owner","slug":"string","statuses":[{"agent_id":"2b1e3b65-2c04-4fa2-a2d7-467901e98978","app_id":"affd1d10-9538-4fc8-9e0b-4594a28c1335","created_at":"2019-08-24T14:15:22Z","icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","message":"string","needs_user_attention":true,"state":"working","uri":"string","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9"}],"subdomain":true,"subdomain_name":"string","tooltip":"string","url":"string"}],"architecture":"string","connection_timeout_seconds":0,"created_at":"2019-08-24T14:15:22Z","directory":"string","disconnected_at":"2019-08-24T14:15:22Z","display_apps":["vscode"],"environment_variables":{"property1":"string","property2":"string"},"expanded_directory":"string","first_connected_at":"2019-08-24T14:15:22Z","health":{"healthy":false,"reason":"agent has lost connection"},"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","log_sources":[{"created_at":"2019-08-24T14:15:22Z","display_name":"string","icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","workspace_agent_id":"7ad2e618-fea7-4c1a-b70a-f501566a72f1"}],"logs_length":0,"logs_overflowed":true,"metadata":[{"description":{"display_name":"string","interval":0,"key":"string","script":"string","timeout":0},"result":{"age":0,"collected_at":"2019-08-24T14:15:22Z","error":"string","value":"string"}}],"name":"string","operating_system":"string","parent_id":{"uuid":"string","valid":true},"ready_at":"2019-08-24T14:15:22Z","resource_id":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","scripts":[{"cron":"string","display_name":"string","exit_code":0,"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","log_path":"string","log_source_id":"4197ab25-95cf-4b91-9c78-f7f2af5d353a","run_on_start":true,"run_on_stop":true,"script":"string","start_blocks_login":true,"status":"ok","timeout":0}],"started_at":"2019-08-24T14:15:22Z","startup_script_behavior":"blocking","status":"connecting","subsystems":["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","template_version_preset_id":"512a53a7-30da-446e-a1fc-713c630baff1","transition":"start","updated_at":"2019-08-24T14:15:22Z","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9","workspace_name":"string","workspace_owner_avatar_url":"string","workspace_owner_id":"e7078695-5279-4c86-8774-3ac2367a2fc7","workspace_owner_name":"string"},"name":"string","next_start_at":"2019-08-24T14:15:22Z","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","organization_name":"string","outdated":true,"owner_avatar_url":"string","owner_id":"8826ee2e-7933-4665-aef2-2393f84a0d05","owner_name":"string","shared_with":[{"actor_type":"group","avatar_url":"http://example.com","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","name":"string","roles":["admin"]}],"task_id":{"uuid":"string","valid":true},"template_active_version_id":"b0da9c29-67d8-4c87-888c-bafe356f7f3c","template_allow_user_cancel_workspace_jobs":true,"template_display_name":"string","template_icon":"string","template_id":"c6d67e98-83ea-49f0-8812-e4abae2b68bc","template_name":"string","template_require_active_version":true,"template_use_classic_parameter_flow":true,"ttl_ms":0,"updated_at":"2019-08-24T14:15:22Z"}
Deleting at indicates the time at which the workspace will be permanently deleted. A workspace is eligible for deletion if it is dormant (a non-nil dormant_at value) and a value has been specified for time_til_dormant_autodelete on its template.
dormant_at
string
false
Dormant at being non-nil indicates a workspace that is dormant. A dormant workspace is no longer accessible must be activated. It is subject to deletion if it breaches the duration of the time_til_ field on its template.
Health shows the health of the workspace and information about what is causing an unhealthy status.
id
string
false
is_prebuild
boolean
false
Is prebuild indicates whether the workspace is a prebuilt workspace. Prebuilt workspaces are owned by the prebuilds system user and have specific behavior, such as being managed differently from regular workspaces. Once a prebuilt workspace is claimed by a user, it transitions to a regular workspace, and IsPrebuild returns false.
{"api_version":"string","apps":[{"command":"string","display_name":"string","external":true,"group":"string","health":"disabled","healthcheck":{"interval":0,"threshold":0,"url":"string"},"hidden":true,"icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","open_in":"slim-window","sharing_level":"owner","slug":"string","statuses":[{"agent_id":"2b1e3b65-2c04-4fa2-a2d7-467901e98978","app_id":"affd1d10-9538-4fc8-9e0b-4594a28c1335","created_at":"2019-08-24T14:15:22Z","icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","message":"string","needs_user_attention":true,"state":"working","uri":"string","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9"}],"subdomain":true,"subdomain_name":"string","tooltip":"string","url":"string"}],"architecture":"string","connection_timeout_seconds":0,"created_at":"2019-08-24T14:15:22Z","directory":"string","disconnected_at":"2019-08-24T14:15:22Z","display_apps":["vscode"],"environment_variables":{"property1":"string","property2":"string"},"expanded_directory":"string","first_connected_at":"2019-08-24T14:15:22Z","health":{"healthy":false,"reason":"agent has lost connection"},"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","log_sources":[{"created_at":"2019-08-24T14:15:22Z","display_name":"string","icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","workspace_agent_id":"7ad2e618-fea7-4c1a-b70a-f501566a72f1"}],"logs_length":0,"logs_overflowed":true,"metadata":[{"description":{"display_name":"string","interval":0,"key":"string","script":"string","timeout":0},"result":{"age":0,"collected_at":"2019-08-24T14:15:22Z","error":"string","value":"string"}}],"name":"string","operating_system":"string","parent_id":{"uuid":"string","valid":true},"ready_at":"2019-08-24T14:15:22Z","resource_id":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","scripts":[{"cron":"string","display_name":"string","exit_code":0,"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","log_path":"string","log_source_id":"4197ab25-95cf-4b91-9c78-f7f2af5d353a","run_on_start":true,"run_on_stop":true,"script":"string","start_blocks_login":true,"status":"ok","timeout":0}],"started_at":"2019-08-24T14:15:22Z","startup_script_behavior":"blocking","status":"connecting","subsystems":["envbox"],"troubleshooting_url":"string","updated_at":"2019-08-24T14:15:22Z","version":"string"}
Metadata is only populated on the workspaces list endpoint when the request opts in with the include_agent_metadata search key, and it only carries the requested keys. The description's script is always empty here: it can be long, and list consumers want values.
Startup script behavior is a legacy field that is deprecated in favor of the coder_script resource. It's only referenced by old clients. Deprecated: Remove in the future!
If 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.
Subdomain denotes whether the app should be accessed via a path on the coder server or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI.
subdomain_name
string
false
Subdomain name is the application domain exposed on the coder server.
tooltip
string
false
Tooltip is an optional markdown supported field that is displayed when hovering over workspace apps in the UI.
url
string
false
URL is the address being proxied to inside the workspace. If external is specified, this will be opened on the client.
{"build_number":0,"created_at":"2019-08-24T14:15:22Z","daily_cost":0,"deadline":"2019-08-24T14:15:22Z","has_ai_task":true,"has_external_agent":true,"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","initiator_id":"06588898-9a84-4b35-ba8f-f9cbd64946f3","initiator_name":"string","job":{"available_workers":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"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":"REQUIRED_TEMPLATE_VARIABLES","file_id":"8a0cfb4f-ddc9-436d-91bb-75133c583767","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","initiator_id":"06588898-9a84-4b35-ba8f-f9cbd64946f3","input":{"error":"string","template_version_id":"0ba39c92-1f1b-4c32-aa3e-9925d7713eb1","workspace_build_id":"badaf2eb-96c5-4050-9f1d-db2d39ca5478"},"logs_overflowed":true,"metadata":{"template_display_name":"string","template_icon":"string","template_id":"c6d67e98-83ea-49f0-8812-e4abae2b68bc","template_name":"string","template_version_name":"string","workspace_build_transition":"start","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9","workspace_name":"string"},"organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","queue_position":0,"queue_size":0,"started_at":"2019-08-24T14:15:22Z","status":"pending","tags":{"property1":"string","property2":"string"},"type":"template_version_import","worker_id":"ae5fa6f7-c55b-40c1-b40a-b36ac467652b","worker_name":"string"},"matched_provisioners":{"available":0,"count":0,"most_recently_seen":"2019-08-24T14:15:22Z"},"max_deadline":"2019-08-24T14:15:22Z","reason":"initiator","resources":[{"agents":[{"api_version":"string","apps":[{"command":"string","display_name":"string","external":true,"group":"string","health":"disabled","healthcheck":{"interval":0,"threshold":0,"url":"string"},"hidden":true,"icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","open_in":"slim-window","sharing_level":"owner","slug":"string","statuses":[{"agent_id":"2b1e3b65-2c04-4fa2-a2d7-467901e98978","app_id":"affd1d10-9538-4fc8-9e0b-4594a28c1335","created_at":"2019-08-24T14:15:22Z","icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","message":"string","needs_user_attention":true,"state":"working","uri":"string","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9"}],"subdomain":true,"subdomain_name":"string","tooltip":"string","url":"string"}],"architecture":"string","connection_timeout_seconds":0,"created_at":"2019-08-24T14:15:22Z","directory":"string","disconnected_at":"2019-08-24T14:15:22Z","display_apps":["vscode"],"environment_variables":{"property1":"string","property2":"string"},"expanded_directory":"string","first_connected_at":"2019-08-24T14:15:22Z","health":{"healthy":false,"reason":"agent has lost connection"},"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","log_sources":[{"created_at":"2019-08-24T14:15:22Z","display_name":"string","icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","workspace_agent_id":"7ad2e618-fea7-4c1a-b70a-f501566a72f1"}],"logs_length":0,"logs_overflowed":true,"metadata":[{"description":{"display_name":"string","interval":0,"key":"string","script":"string","timeout":0},"result":{"age":0,"collected_at":"2019-08-24T14:15:22Z","error":"string","value":"string"}}],"name":"string","operating_system":"string","parent_id":{"uuid":"string","valid":true},"ready_at":"2019-08-24T14:15:22Z","resource_id":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","scripts":[{"cron":"string","display_name":"string","exit_code":0,"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","log_path":"string","log_source_id":"4197ab25-95cf-4b91-9c78-f7f2af5d353a","run_on_start":true,"run_on_stop":true,"script":"string","start_blocks_login":true,"status":"ok","timeout":0}],"started_at":"2019-08-24T14:15:22Z","startup_script_behavior":"blocking","status":"connecting","subsystems":["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","template_version_preset_id":"512a53a7-30da-446e-a1fc-713c630baff1","transition":"start","updated_at":"2019-08-24T14:15:22Z","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9","workspace_name":"string","workspace_owner_avatar_url":"string","workspace_owner_id":"e7078695-5279-4c86-8774-3ac2367a2fc7","workspace_owner_name":"string"}
Properties
Name
Type
Required
Restrictions
Description
build_number
integer
false
created_at
string
false
daily_cost
integer
false
deadline
string
false
has_ai_task
boolean
false
Deprecated: This field has been deprecated in favor of Task WorkspaceID.
How many members are in this group. Shows the total count, even if the user is not authorized to read group member details. May be greater than len(Group.Members).
Status 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_at
string
false
version
string
false
wildcard_hostname
string
false
Wildcard 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.
{"agents":[{"api_version":"string","apps":[{"command":"string","display_name":"string","external":true,"group":"string","health":"disabled","healthcheck":{"interval":0,"threshold":0,"url":"string"},"hidden":true,"icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","open_in":"slim-window","sharing_level":"owner","slug":"string","statuses":[{"agent_id":"2b1e3b65-2c04-4fa2-a2d7-467901e98978","app_id":"affd1d10-9538-4fc8-9e0b-4594a28c1335","created_at":"2019-08-24T14:15:22Z","icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","message":"string","needs_user_attention":true,"state":"working","uri":"string","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9"}],"subdomain":true,"subdomain_name":"string","tooltip":"string","url":"string"}],"architecture":"string","connection_timeout_seconds":0,"created_at":"2019-08-24T14:15:22Z","directory":"string","disconnected_at":"2019-08-24T14:15:22Z","display_apps":["vscode"],"environment_variables":{"property1":"string","property2":"string"},"expanded_directory":"string","first_connected_at":"2019-08-24T14:15:22Z","health":{"healthy":false,"reason":"agent has lost connection"},"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","log_sources":[{"created_at":"2019-08-24T14:15:22Z","display_name":"string","icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","workspace_agent_id":"7ad2e618-fea7-4c1a-b70a-f501566a72f1"}],"logs_length":0,"logs_overflowed":true,"metadata":[{"description":{"display_name":"string","interval":0,"key":"string","script":"string","timeout":0},"result":{"age":0,"collected_at":"2019-08-24T14:15:22Z","error":"string","value":"string"}}],"name":"string","operating_system":"string","parent_id":{"uuid":"string","valid":true},"ready_at":"2019-08-24T14:15:22Z","resource_id":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","scripts":[{"cron":"string","display_name":"string","exit_code":0,"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","log_path":"string","log_source_id":"4197ab25-95cf-4b91-9c78-f7f2af5d353a","run_on_start":true,"run_on_stop":true,"script":"string","start_blocks_login":true,"status":"ok","timeout":0}],"started_at":"2019-08-24T14:15:22Z","startup_script_behavior":"blocking","status":"connecting","subsystems":["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"}
{"count":0,"workspaces":[{"allow_renames":true,"automatic_updates":"always","autostart_schedule":"string","created_at":"2019-08-24T14:15:22Z","deleting_at":"2019-08-24T14:15:22Z","dormant_at":"2019-08-24T14:15:22Z","favorite":true,"health":{"failing_agents":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"healthy":false},"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","is_prebuild":true,"last_used_at":"2019-08-24T14:15:22Z","latest_app_status":{"agent_id":"2b1e3b65-2c04-4fa2-a2d7-467901e98978","app_id":"affd1d10-9538-4fc8-9e0b-4594a28c1335","created_at":"2019-08-24T14:15:22Z","icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","message":"string","needs_user_attention":true,"state":"working","uri":"string","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9"},"latest_build":{"build_number":0,"created_at":"2019-08-24T14:15:22Z","daily_cost":0,"deadline":"2019-08-24T14:15:22Z","has_ai_task":true,"has_external_agent":true,"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","initiator_id":"06588898-9a84-4b35-ba8f-f9cbd64946f3","initiator_name":"string","job":{"available_workers":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"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":"REQUIRED_TEMPLATE_VARIABLES","file_id":"8a0cfb4f-ddc9-436d-91bb-75133c583767","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","initiator_id":"06588898-9a84-4b35-ba8f-f9cbd64946f3","input":{"error":"string","template_version_id":"0ba39c92-1f1b-4c32-aa3e-9925d7713eb1","workspace_build_id":"badaf2eb-96c5-4050-9f1d-db2d39ca5478"},"logs_overflowed":true,"metadata":{"template_display_name":"string","template_icon":"string","template_id":"c6d67e98-83ea-49f0-8812-e4abae2b68bc","template_name":"string","template_version_name":"string","workspace_build_transition":"start","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9","workspace_name":"string"},"organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","queue_position":0,"queue_size":0,"started_at":"2019-08-24T14:15:22Z","status":"pending","tags":{"property1":"string","property2":"string"},"type":"template_version_import","worker_id":"ae5fa6f7-c55b-40c1-b40a-b36ac467652b","worker_name":"string"},"matched_provisioners":{"available":0,"count":0,"most_recently_seen":"2019-08-24T14:15:22Z"},"max_deadline":"2019-08-24T14:15:22Z","reason":"initiator","resources":[{"agents":[{"api_version":"string","apps":[{"command":"string","display_name":"string","external":true,"group":"string","health":"disabled","healthcheck":{},"hidden":true,"icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","open_in":"slim-window","sharing_level":"owner","slug":"string","statuses":[],"subdomain":true,"subdomain_name":"string","tooltip":"string","url":"string"}],"architecture":"string","connection_timeout_seconds":0,"created_at":"2019-08-24T14:15:22Z","directory":"string","disconnected_at":"2019-08-24T14:15:22Z","display_apps":["vscode"],"environment_variables":{"property1":"string","property2":"string"},"expanded_directory":"string","first_connected_at":"2019-08-24T14:15:22Z","health":{"healthy":false,"reason":"agent has lost connection"},"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","log_sources":[{"created_at":"2019-08-24T14:15:22Z","display_name":"string","icon":"string","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","workspace_agent_id":"7ad2e618-fea7-4c1a-b70a-f501566a72f1"}],"logs_length":0,"logs_overflowed":true,"metadata":[{"description":{},"result":{}}],"name":"string","operating_system":"string","parent_id":{"uuid":"string","valid":true},"ready_at":"2019-08-24T14:15:22Z","resource_id":"4d5215ed-38bb-48ed-879a-fdb9ca58522f","scripts":[{"cron":"string","display_name":"string","exit_code":0,"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","log_path":"string","log_source_id":"4197ab25-95cf-4b91-9c78-f7f2af5d353a","run_on_start":true,"run_on_stop":true,"script":"string","start_blocks_login":true,"status":"ok","timeout":0}],"started_at":"2019-08-24T14:15:22Z","startup_script_behavior":"blocking","status":"connecting","subsystems":["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","template_version_preset_id":"512a53a7-30da-446e-a1fc-713c630baff1","transition":"start","updated_at":"2019-08-24T14:15:22Z","workspace_id":"0967198e-ec7b-4c6b-b4d3-f71244cadbe9","workspace_name":"string","workspace_owner_avatar_url":"string","workspace_owner_id":"e7078695-5279-4c86-8774-3ac2367a2fc7","workspace_owner_name":"string"},"name":"string","next_start_at":"2019-08-24T14:15:22Z","organization_id":"7c60d51f-b44e-4682-87d6-449835ea4de6","organization_name":"string","outdated":true,"owner_avatar_url":"string","owner_id":"8826ee2e-7933-4665-aef2-2393f84a0d05","owner_name":"string","shared_with":[{"actor_type":"group","avatar_url":"http://example.com","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","name":"string","roles":["admin"]}],"task_id":{"uuid":"string","valid":true},"template_active_version_id":"b0da9c29-67d8-4c87-888c-bafe356f7f3c","template_allow_user_cancel_workspace_jobs":true,"template_display_name":"string","template_icon":"string","template_id":"c6d67e98-83ea-49f0-8812-e4abae2b68bc","template_name":"string","template_require_active_version":true,"template_use_classic_parameter_flow":true,"ttl_ms":0,"updated_at":"2019-08-24T14:15:22Z"}]}
Access token is the token that authorizes and authenticates the requests.
expires_in
integer
false
Expires in is the OAuth2 wire format "expires_in" field, which specifies how many seconds later the token expires, relative to an unknown time base approximately around "now". It is the application's responsibility to populate Expiry from ExpiresIn when required.
expiry
string
false
Expiry is the optional expiration time of the access token.
If zero, [TokenSource] implementations will reuse the same token forever and RefreshToken or equivalent mechanisms for that TokenSource will not be used.
refresh_token
string
false
Refresh token is a token that's used by the application (as opposed to the user) to refresh the access token if it expires.
token_type
string
false
Token type is the type of token. The Type method returns either this or "Bearer", the default.
Forcequery indicates whether the original URL contained a query ('?') character. When set, the String method will include a trailing '?', even when RawQuery is empty.
fragment
string
false
fragment for references (without '#')
host
string
false
"host" or "host:port" (see Hostname and Port methods)
omitHost
boolean
false
Omithost indicates the URL has an empty host (authority). When set, the String method will not include the host when it is empty.
opaque
string
false
encoded opaque data
path
string
false
path (relative paths may omit leading slash)
rawFragment
string
false
Rawfragment is an optional field containing an encoded fragment hint. See the EscapedFragment method for more details.
In general, code should call EscapedFragment instead of reading RawFragment.
rawPath
string
false
Rawpath is an optional field containing an encoded path hint. See the EscapedPath method for more details.
In general, code should call EscapedPath instead of reading RawPath.
rawQuery
string
false
Rawquery contains the encoded query values, without the initial '?'. Use URL.Query to decode the query.
Regionscore scales latencies of DERP regions by a given scaling factor when determining which region to use as the home ("preferred") DERP. Scores in the range (0, 1) will cause this region to be proportionally more preferred, and scores in the range (1, ∞) will penalize a region.
If a region is not present in this map, it is treated as having a score of 1.0.
Scores should not be 0 or negative; such scores will be ignored.
A nil map means no change from the previous value (if any); an empty non-nil map can be sent to reset all scores back to 1.0.
Homeparams if non-nil, is a change in home parameters.
The rest of the DEPRMap fields, if zero, means unchanged.
omitDefaultRegions
boolean
false
Omitdefaultregions specifies to not use Tailscale's DERP servers, and only use those specified in this DERPMap. If there are none set outside of the defaults, this is a noop.
This field is only meaningful if the Regions map is non-nil (indicating a change).
regions
object
false
Regions is the set of geographic regions running DERP node(s).
Canport80 specifies whether this DERP node is accessible over HTTP on port 80 specifically. This is used for captive portal checks.
certName
string
false
Certname optionally specifies the expected TLS cert common name. If empty, HostName is used. If CertName is non-empty, HostName is only used for the TCP dial (if IPv4/IPv6 are not present) + TLS ClientHello.
derpport
integer
false
Derpport optionally provides an alternate TLS port number for the DERP HTTPS server.
If zero, 443 is used.
forceHTTP
boolean
false
Forcehttp is used by unit tests to force HTTP. It should not be set by users.
hostName
string
false
Hostname is the DERP node's hostname.
It is required but need not be unique; multiple nodes may have the same HostName but vary in configuration otherwise.
insecureForTests
boolean
false
Insecurefortests is used by unit tests to disable TLS verification. It should not be set by users.
ipv4
string
false
Ipv4 optionally forces an IPv4 address to use, instead of using DNS. If empty, A record(s) from DNS lookups of HostName are used. If the string is not an IPv4 address, IPv4 is not used; the conventional string to disable IPv4 (and not use DNS) is "none".
ipv6
string
false
Ipv6 optionally forces an IPv6 address to use, instead of using DNS. If empty, AAAA record(s) from DNS lookups of HostName are used. If the string is not an IPv6 address, IPv6 is not used; the conventional string to disable IPv6 (and not use DNS) is "none".
name
string
false
Name is a unique node name (across all regions). It is not a host name. It's typically of the form "1b", "2a", "3b", etc. (region ID + suffix within that region)
regionID
integer
false
Regionid is the RegionID of the DERPRegion that this node is running in.
stunonly
boolean
false
Stunonly marks a node as only a STUN server and not a DERP server.
stunport
integer
false
Port optionally specifies a STUN port to use. Zero means 3478. To disable STUN on this node, use -1.
stuntestIP
string
false
Stuntestip is used in tests to override the STUN server's IP. If empty, it's assumed to be the same as the DERP server.
Avoid is whether the client should avoid picking this as its home region. The region should only be used if a peer is there. Clients already using this region as their home should migrate away to a new region without Avoid set.
embeddedRelay
boolean
false
Embeddedrelay is true when the region is bundled with the Coder control plane.
Nodes are the DERP nodes running in this region, in priority order for the current client. Client TLS connections should ideally only go to the first entry (falling back to the second if necessary). STUN packets should go to the first 1 or 2.
If nodes within a region route packets amongst themselves, but not to other regions. That said, each user/domain should get a the same preferred node order, so if all nodes for a user/network pick the first one (as they should, when things are healthy), the inter-cluster routing is minimal to zero.
regionCode
string
false
Regioncode is a short name for the region. It's usually a popular city or airport code in the region: "nyc", "sf", "sin", "fra", etc.
regionID
integer
false
Regionid is a unique integer for a geographic region.
It corresponds to the legacy derpN.tailscale.com hostnames used by older clients. (Older clients will continue to resolve derpN.tailscale.com when contacting peers, rather than use the server-provided DERPMap)
RegionIDs must be non-zero, positive, and guaranteed to fit in a JavaScript number.
RegionIDs in range 900-999 are reserved for end users to run their own DERP nodes.
regionName
string
false
Regionname is a long English name for the region: "New York City", "San Francisco", "Singapore", "Frankfurt", etc.
Agent name or ID is not required if the workspace has only one agent.
app_prefix
string
false
Prefix is the prefix of the subdomain app URL. Prefix should have a trailing "---" if set.
app_slug_or_port
string
false
base_path
string
false
Base path of the app. For path apps, this is the path prefix in the router for this particular app. For subdomain apps, this should be "/". This is used for setting the cookie path.
username_or_id
string
false
For the following fields, if the AccessMethod is AccessMethodTerminal, then only AgentNameOrID may be set and it must be a UUID. The other fields must be left blank.
Replica ID is a unique identifier for the replica of the proxy that is deregistering. It should be generated by the client on startup and should've already been passed to the register endpoint.
wsproxysdk.IssueSignedAppTokenResponse
{"signed_token_str":"string"}
Properties
Name
Type
Required
Restrictions
Description
signed_token_str
string
false
Signed token str should be set as a cookie on the response.
Derp enabled indicates whether the proxy should be included in the DERP map or not.
derp_only
boolean
false
Derp only indicates whether the proxy should only be included in the DERP map and should not be used for serving apps.
hostname
string
false
Hostname is the OS hostname of the machine that the proxy is running on. This is only used for tracking purposes in the replicas table.
replica_error
string
false
Replica error is the error that the replica encountered when trying to dial it's peers. This is stored in the replicas table for debugging purposes but does not affect the proxy's ability to register.
This value is only stored on subsequent requests to the register endpoint, not the first request.
replica_id
string
false
Replica ID is a unique identifier for the replica of the proxy that is registering. It should be generated by the client on startup and persisted (in memory only) until the process is restarted.
replica_relay_address
string
false
Replica relay address is the DERP address of the replica that other replicas may use to connect internally for DERP meshing.
version
string
false
Version is the Coder version of the proxy.
wildcard_hostname
string
false
Wildcard hostname that the workspace proxy api is serving for subdomain apps.