diff --git a/Makefile b/Makefile
index 40a981afd59d8..cd7c316a4e266 100644
--- a/Makefile
+++ b/Makefile
@@ -483,7 +483,7 @@ docs/admin/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/me
cd site
yarn run format:write:only ../docs/admin/prometheus.md
-coderd/apidoc/swagger.json: $(shell find ./scripts/apidocgen -not \( -path './scripts/apidocgen/node_modules' -prune \) -type f) $(wildcard coderd/*.go) $(wildcard codersdk/*.go) .swaggo
+coderd/apidoc/swagger.json: $(shell find ./scripts/apidocgen -not \( -path './scripts/apidocgen/node_modules' -prune \) -type f) $(wildcard coderd/*.go) $(wildcard enterprise/coderd/*.go) $(wildcard codersdk/*.go) .swaggo
./scripts/apidocgen/generate.sh
cd site
yarn run format:write:only ../docs/api ../docs/manifest.json ../coderd/apidoc/swagger.json
diff --git a/coderd/apidoc/docs.go b/coderd/apidoc/docs.go
index 17fac114fc91b..c103fa9ca0ec9 100644
--- a/coderd/apidoc/docs.go
+++ b/coderd/apidoc/docs.go
@@ -45,6 +45,65 @@ const docTemplate = `{
}
}
},
+ "/appearance": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Enterprise"
+ ],
+ "summary": "Get appearance",
+ "operationId": "get-appearance",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/codersdk.AppearanceConfig"
+ }
+ }
+ }
+ },
+ "put": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Enterprise"
+ ],
+ "summary": "Update appearance",
+ "operationId": "update-appearance",
+ "parameters": [
+ {
+ "description": "Update appearance request",
+ "name": "request",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/codersdk.AppearanceConfig"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/codersdk.AppearanceConfig"
+ }
+ }
+ }
+ }
+ },
"/applications/auth-redirect": {
"get": {
"security": [
@@ -303,6 +362,31 @@ const docTemplate = `{
}
}
},
+ "/entitlements": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Enterprise"
+ ],
+ "summary": "Get entitlements",
+ "operationId": "get-entitlements",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/codersdk.Entitlements"
+ }
+ }
+ }
+ }
+ },
"/files": {
"post": {
"security": [
@@ -378,6 +462,172 @@ const docTemplate = `{
}
}
},
+ "/groups": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Enterprise"
+ ],
+ "summary": "Get groups",
+ "operationId": "get-groups",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "Organization ID",
+ "name": "organization",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.Group"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/groups/{groupName}": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Enterprise"
+ ],
+ "summary": "Get group by name",
+ "operationId": "get-group-by-name",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Group name",
+ "name": "groupName",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/codersdk.Group"
+ }
+ }
+ }
+ }
+ },
+ "/license/{id}": {
+ "delete": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Enterprise"
+ ],
+ "summary": "Delete license",
+ "operationId": "delete-license",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "number",
+ "description": "License ID",
+ "name": "id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
+ "/licenses": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Enterprise"
+ ],
+ "summary": "Get licenses",
+ "operationId": "get-licenses",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.License"
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Organizations"
+ ],
+ "summary": "Add new license",
+ "operationId": "add-new-license",
+ "parameters": [
+ {
+ "description": "Add license request",
+ "name": "request",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/codersdk.AddLicenseRequest"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "Created",
+ "schema": {
+ "$ref": "#/definitions/codersdk.License"
+ }
+ }
+ }
+ }
+ },
"/organizations": {
"post": {
"security": [
@@ -449,6 +699,88 @@ const docTemplate = `{
}
}
},
+ "/organizations/{organization}/groups": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Enterprise"
+ ],
+ "summary": "Get groups by organization",
+ "operationId": "get-groups-by-organization",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "Organization ID",
+ "name": "organization",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.Group"
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Templates"
+ ],
+ "summary": "Create group for organization",
+ "operationId": "create-group-for-organization",
+ "parameters": [
+ {
+ "description": "Create group request",
+ "name": "request",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/codersdk.CreateGroupRequest"
+ }
+ },
+ {
+ "type": "string",
+ "description": "Organization ID",
+ "name": "organization",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "Created",
+ "schema": {
+ "$ref": "#/definitions/codersdk.Group"
+ }
+ }
+ }
+ }
+ },
"/organizations/{organization}/members/roles": {
"get": {
"security": [
@@ -582,6 +914,76 @@ const docTemplate = `{
}
}
},
+ "/organizations/{organization}/provisionerdaemons": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Enterprise"
+ ],
+ "summary": "Get provisioner daemons",
+ "operationId": "get-provisioner-daemons",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "Organization ID",
+ "name": "organization",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.ProvisionerDaemon"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/organizations/{organization}/provisionerdaemons/serve": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Enterprise"
+ ],
+ "summary": "Serve provisioner daemon",
+ "operationId": "serve-provisioner-daemon",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "Organization ID",
+ "name": "organization",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "101": {
+ "description": "Switching Protocols"
+ }
+ }
+ }
+ },
"/organizations/{organization}/templates": {
"get": {
"security": [
@@ -904,133 +1306,271 @@ const docTemplate = `{
"required": true
},
{
- "type": "string",
- "format": "uuid",
- "description": "ID",
- "name": "id",
- "in": "path",
- "required": true
+ "type": "string",
+ "format": "uuid",
+ "description": "ID",
+ "name": "id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.Parameter"
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Parameters"
+ ],
+ "summary": "Create parameter",
+ "operationId": "create-parameter",
+ "parameters": [
+ {
+ "description": "Parameter request",
+ "name": "request",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/codersdk.CreateParameterRequest"
+ }
+ },
+ {
+ "enum": [
+ "template",
+ "workspace",
+ "import_job"
+ ],
+ "type": "string",
+ "description": "Scope",
+ "name": "scope",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "ID",
+ "name": "id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "Created",
+ "schema": {
+ "$ref": "#/definitions/codersdk.Parameter"
+ }
+ }
+ }
+ }
+ },
+ "/parameters/{scope}/{id}/{name}": {
+ "delete": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Parameters"
+ ],
+ "summary": "Delete parameter",
+ "operationId": "delete-parameter",
+ "parameters": [
+ {
+ "enum": [
+ "template",
+ "workspace",
+ "import_job"
+ ],
+ "type": "string",
+ "description": "Scope",
+ "name": "scope",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "ID",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Name",
+ "name": "name",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/codersdk.Response"
+ }
+ }
+ }
+ }
+ },
+ "/replicas": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
}
],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Enterprise"
+ ],
+ "summary": "Get active replicas",
+ "operationId": "get-active-replicas",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
- "$ref": "#/definitions/codersdk.Parameter"
+ "$ref": "#/definitions/codersdk.Replica"
}
}
}
}
- },
+ }
+ },
+ "/scim/v2/Users": {
"post": {
"security": [
{
"CoderSessionToken": []
}
],
- "consumes": [
- "application/json"
- ],
"produces": [
"application/json"
],
"tags": [
- "Parameters"
+ "Enterprise"
],
- "summary": "Create parameter",
- "operationId": "create-parameter",
+ "summary": "SCIM 2.0: Create new user",
+ "operationId": "scim-create-new-user",
"parameters": [
{
- "description": "Parameter request",
+ "description": "New user",
"name": "request",
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/codersdk.CreateParameterRequest"
+ "$ref": "#/definitions/coderd.SCIMUser"
}
- },
- {
- "enum": [
- "template",
- "workspace",
- "import_job"
- ],
- "type": "string",
- "description": "Scope",
- "name": "scope",
- "in": "path",
- "required": true
- },
- {
- "type": "string",
- "format": "uuid",
- "description": "ID",
- "name": "id",
- "in": "path",
- "required": true
}
],
"responses": {
- "201": {
- "description": "Created",
+ "200": {
+ "description": "OK",
"schema": {
- "$ref": "#/definitions/codersdk.Parameter"
+ "$ref": "#/definitions/coderd.SCIMUser"
}
}
}
}
},
- "/parameters/{scope}/{id}/{name}": {
- "delete": {
+ "/scim/v2/Users/{id}": {
+ "get": {
"security": [
{
"CoderSessionToken": []
}
],
"produces": [
- "application/json"
+ "application/scim+json"
],
"tags": [
- "Parameters"
+ "Enterprise"
],
- "summary": "Delete parameter",
- "operationId": "delete-parameter",
+ "summary": "SCIM 2.0: Get user by ID",
+ "operationId": "scim-get-user-by-id",
"parameters": [
{
- "enum": [
- "template",
- "workspace",
- "import_job"
- ],
"type": "string",
- "description": "Scope",
- "name": "scope",
+ "format": "uuid",
+ "description": "User ID",
+ "name": "id",
"in": "path",
"required": true
- },
+ }
+ ],
+ "responses": {
+ "404": {
+ "description": "Not Found"
+ }
+ }
+ },
+ "patch": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/scim+json"
+ ],
+ "tags": [
+ "Enterprise"
+ ],
+ "summary": "SCIM 2.0: Update user account",
+ "operationId": "scim-update-user-status",
+ "parameters": [
{
"type": "string",
"format": "uuid",
- "description": "ID",
+ "description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
- "type": "string",
- "description": "Name",
- "name": "name",
- "in": "path",
- "required": true
+ "description": "Update user request",
+ "name": "request",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/coderd.SCIMUser"
+ }
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/codersdk.Response"
+ "$ref": "#/definitions/codersdk.User"
}
}
}
@@ -1319,6 +1859,86 @@ const docTemplate = `{
}
}
},
+ "/templates/{template}/acl": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Enterprise"
+ ],
+ "summary": "Get template ACLs",
+ "operationId": "get-template-acls",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "Template ID",
+ "name": "template",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.TemplateUser"
+ }
+ }
+ }
+ }
+ },
+ "patch": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Enterprise"
+ ],
+ "summary": "Update template ACL",
+ "operationId": "update-template-acl",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "Template ID",
+ "name": "template",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "Update template request",
+ "name": "request",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/codersdk.UpdateTemplateACL"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/codersdk.Response"
+ }
+ }
+ }
+ }
+ },
"/templateversions/{templateversion}": {
"get": {
"security": [
@@ -2852,6 +3472,40 @@ const docTemplate = `{
}
}
},
+ "/workspace-quota/{user}": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Enterprise"
+ ],
+ "summary": "Get workspace quota by user",
+ "operationId": "get-workspace-quota-by-user",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "User ID, name, or me",
+ "name": "user",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/codersdk.WorkspaceQuota"
+ }
+ }
+ }
+ }
+ },
"/workspaceagents/aws-instance-identity": {
"post": {
"security": [
@@ -3819,6 +4473,70 @@ const docTemplate = `{
}
},
"definitions": {
+ "coderd.SCIMUser": {
+ "type": "object",
+ "properties": {
+ "active": {
+ "type": "boolean"
+ },
+ "emails": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "display": {
+ "type": "string"
+ },
+ "primary": {
+ "type": "boolean"
+ },
+ "type": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string",
+ "format": "email"
+ }
+ }
+ }
+ },
+ "groups": {
+ "type": "array",
+ "items": {}
+ },
+ "id": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "properties": {
+ "resourceType": {
+ "type": "string"
+ }
+ }
+ },
+ "name": {
+ "type": "object",
+ "properties": {
+ "familyName": {
+ "type": "string"
+ },
+ "givenName": {
+ "type": "string"
+ }
+ }
+ },
+ "schemas": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "userName": {
+ "type": "string"
+ }
+ }
+ },
"coderd.cspViolation": {
"type": "object",
"properties": {
@@ -3889,7 +4607,6 @@ const docTemplate = `{
"format": "date-time"
},
"user_id": {
- "description": "NOTE: do not ever return the HashedSecret",
"type": "string",
"format": "uuid"
}
@@ -3921,6 +4638,17 @@ const docTemplate = `{
}
}
},
+ "codersdk.AddLicenseRequest": {
+ "type": "object",
+ "required": [
+ "license"
+ ],
+ "properties": {
+ "license": {
+ "type": "string"
+ }
+ }
+ },
"codersdk.AgentGitSSHKey": {
"type": "object",
"properties": {
@@ -3973,6 +4701,17 @@ const docTemplate = `{
}
}
},
+ "codersdk.AppearanceConfig": {
+ "type": "object",
+ "properties": {
+ "logo_url": {
+ "type": "string"
+ },
+ "service_banner": {
+ "$ref": "#/definitions/codersdk.ServiceBannerConfig"
+ }
+ }
+ },
"codersdk.AssignableRoles": {
"type": "object",
"properties": {
@@ -4244,9 +4983,23 @@ const docTemplate = `{
"type": "string",
"format": "uuid"
},
- "user_id": {
- "type": "string",
- "format": "uuid"
+ "user_id": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ },
+ "codersdk.CreateGroupRequest": {
+ "type": "object",
+ "properties": {
+ "avatar_url": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "quota_allowance": {
+ "type": "integer"
}
}
},
@@ -4875,6 +5628,68 @@ const docTemplate = `{
}
}
},
+ "codersdk.Entitlement": {
+ "type": "string",
+ "enum": [
+ "entitled",
+ "grace_period",
+ "not_entitled"
+ ],
+ "x-enum-varnames": [
+ "EntitlementEntitled",
+ "EntitlementGracePeriod",
+ "EntitlementNotEntitled"
+ ]
+ },
+ "codersdk.Entitlements": {
+ "type": "object",
+ "properties": {
+ "errors": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "experimental": {
+ "type": "boolean"
+ },
+ "features": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/codersdk.Feature"
+ }
+ },
+ "has_license": {
+ "type": "boolean"
+ },
+ "trial": {
+ "type": "boolean"
+ },
+ "warnings": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "codersdk.Feature": {
+ "type": "object",
+ "properties": {
+ "actual": {
+ "type": "integer"
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "entitlement": {
+ "$ref": "#/definitions/codersdk.Entitlement"
+ },
+ "limit": {
+ "type": "integer"
+ }
+ }
+ },
"codersdk.GenerateAPIKeyResponse": {
"type": "object",
"properties": {
@@ -4972,6 +5787,34 @@ const docTemplate = `{
}
}
},
+ "codersdk.Group": {
+ "type": "object",
+ "properties": {
+ "avatar_url": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid"
+ },
+ "members": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.User"
+ }
+ },
+ "name": {
+ "type": "string"
+ },
+ "organization_id": {
+ "type": "string",
+ "format": "uuid"
+ },
+ "quota_allowance": {
+ "type": "integer"
+ }
+ }
+ },
"codersdk.Healthcheck": {
"type": "object",
"properties": {
@@ -4989,6 +5832,27 @@ const docTemplate = `{
}
}
},
+ "codersdk.License": {
+ "type": "object",
+ "properties": {
+ "claims": {
+ "description": "Claims are the JWT claims asserted by the license. Here we use\na generic string map to ensure that all data from the server is\nparsed verbatim, not just the fields this version of Coder\nunderstands.",
+ "type": "object",
+ "additionalProperties": true
+ },
+ "id": {
+ "type": "integer"
+ },
+ "uploaded_at": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "uuid": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ },
"codersdk.LogLevel": {
"type": "string",
"enum": [
@@ -5412,6 +6276,42 @@ const docTemplate = `{
}
}
},
+ "codersdk.ProvisionerDaemon": {
+ "type": "object",
+ "properties": {
+ "created_at": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid"
+ },
+ "name": {
+ "type": "string"
+ },
+ "provisioners": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "tags": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "updated_at": {
+ "format": "date-time",
+ "allOf": [
+ {
+ "$ref": "#/definitions/sql.NullTime"
+ }
+ ]
+ }
+ }
+ },
"codersdk.ProvisionerJob": {
"type": "object",
"properties": {
@@ -5545,6 +6445,41 @@ const docTemplate = `{
}
}
},
+ "codersdk.Replica": {
+ "type": "object",
+ "properties": {
+ "created_at": {
+ "description": "CreatedAt is the timestamp when the replica was first seen.",
+ "type": "string",
+ "format": "date-time"
+ },
+ "database_latency": {
+ "description": "DatabaseLatency is the latency in microseconds to the database.",
+ "type": "integer"
+ },
+ "error": {
+ "description": "Error is the replica error.",
+ "type": "string"
+ },
+ "hostname": {
+ "description": "Hostname is the hostname of the replica.",
+ "type": "string"
+ },
+ "id": {
+ "description": "ID is the unique identifier for the replica.",
+ "type": "string",
+ "format": "uuid"
+ },
+ "region_id": {
+ "description": "RegionID is the region of the replica.",
+ "type": "integer"
+ },
+ "relay_address": {
+ "description": "RelayAddress is the accessible address to relay DERP connections.",
+ "type": "string"
+ }
+ }
+ },
"codersdk.ResourceType": {
"type": "string",
"enum": [
@@ -5601,6 +6536,20 @@ const docTemplate = `{
}
}
},
+ "codersdk.ServiceBannerConfig": {
+ "type": "object",
+ "properties": {
+ "background_color": {
+ "type": "string"
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ },
"codersdk.SwaggerConfig": {
"type": "object",
"properties": {
@@ -5771,6 +6720,88 @@ const docTemplate = `{
}
}
},
+ "codersdk.TemplateRole": {
+ "type": "string",
+ "enum": [
+ "admin",
+ "use",
+ ""
+ ],
+ "x-enum-varnames": [
+ "TemplateRoleAdmin",
+ "TemplateRoleUse",
+ "TemplateRoleDeleted"
+ ]
+ },
+ "codersdk.TemplateUser": {
+ "type": "object",
+ "required": [
+ "created_at",
+ "email",
+ "id",
+ "username"
+ ],
+ "properties": {
+ "avatar_url": {
+ "type": "string",
+ "format": "uri"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "email": {
+ "type": "string",
+ "format": "email"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid"
+ },
+ "last_seen_at": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "organization_ids": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ "role": {
+ "enum": [
+ "admin",
+ "use"
+ ],
+ "allOf": [
+ {
+ "$ref": "#/definitions/codersdk.TemplateRole"
+ }
+ ]
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.Role"
+ }
+ },
+ "status": {
+ "enum": [
+ "active",
+ "suspended"
+ ],
+ "allOf": [
+ {
+ "$ref": "#/definitions/codersdk.UserStatus"
+ }
+ ]
+ },
+ "username": {
+ "type": "string"
+ }
+ }
+ },
"codersdk.TemplateVersion": {
"type": "object",
"properties": {
@@ -5875,6 +6906,23 @@ const docTemplate = `{
}
}
},
+ "codersdk.UpdateTemplateACL": {
+ "type": "object",
+ "properties": {
+ "group_perms": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/codersdk.TemplateRole"
+ }
+ },
+ "user_perms": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/codersdk.TemplateRole"
+ }
+ }
+ }
+ },
"codersdk.UpdateUserPasswordRequest": {
"type": "object",
"required": [
@@ -6435,6 +7483,17 @@ const docTemplate = `{
}
}
},
+ "codersdk.WorkspaceQuota": {
+ "type": "object",
+ "properties": {
+ "budget": {
+ "type": "integer"
+ },
+ "credits_consumed": {
+ "type": "integer"
+ }
+ }
+ },
"codersdk.WorkspaceResource": {
"type": "object",
"properties": {
@@ -6634,6 +7693,18 @@ const docTemplate = `{
}
}
},
+ "sql.NullTime": {
+ "type": "object",
+ "properties": {
+ "time": {
+ "type": "string"
+ },
+ "valid": {
+ "description": "Valid is true if Time is not NULL",
+ "type": "boolean"
+ }
+ }
+ },
"tailcfg.DERPMap": {
"type": "object",
"properties": {
diff --git a/coderd/apidoc/swagger.json b/coderd/apidoc/swagger.json
index 1e823c2ef136e..ae8733e3a44fe 100644
--- a/coderd/apidoc/swagger.json
+++ b/coderd/apidoc/swagger.json
@@ -33,6 +33,57 @@
}
}
},
+ "/appearance": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Enterprise"],
+ "summary": "Get appearance",
+ "operationId": "get-appearance",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/codersdk.AppearanceConfig"
+ }
+ }
+ }
+ },
+ "put": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Enterprise"],
+ "summary": "Update appearance",
+ "operationId": "update-appearance",
+ "parameters": [
+ {
+ "description": "Update appearance request",
+ "name": "request",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/codersdk.AppearanceConfig"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/codersdk.AppearanceConfig"
+ }
+ }
+ }
+ }
+ },
"/applications/auth-redirect": {
"get": {
"security": [
@@ -257,6 +308,27 @@
}
}
},
+ "/entitlements": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Enterprise"],
+ "summary": "Get entitlements",
+ "operationId": "get-entitlements",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/codersdk.Entitlements"
+ }
+ }
+ }
+ }
+ },
"/files": {
"post": {
"security": [
@@ -324,6 +396,152 @@
}
}
},
+ "/groups": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Enterprise"],
+ "summary": "Get groups",
+ "operationId": "get-groups",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "Organization ID",
+ "name": "organization",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.Group"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/groups/{groupName}": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Enterprise"],
+ "summary": "Get group by name",
+ "operationId": "get-group-by-name",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Group name",
+ "name": "groupName",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/codersdk.Group"
+ }
+ }
+ }
+ }
+ },
+ "/license/{id}": {
+ "delete": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Enterprise"],
+ "summary": "Delete license",
+ "operationId": "delete-license",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "number",
+ "description": "License ID",
+ "name": "id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
+ "/licenses": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Enterprise"],
+ "summary": "Get licenses",
+ "operationId": "get-licenses",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.License"
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Organizations"],
+ "summary": "Add new license",
+ "operationId": "add-new-license",
+ "parameters": [
+ {
+ "description": "Add license request",
+ "name": "request",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/codersdk.AddLicenseRequest"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "Created",
+ "schema": {
+ "$ref": "#/definitions/codersdk.License"
+ }
+ }
+ }
+ }
+ },
"/organizations": {
"post": {
"security": [
@@ -387,6 +605,78 @@
}
}
},
+ "/organizations/{organization}/groups": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Enterprise"],
+ "summary": "Get groups by organization",
+ "operationId": "get-groups-by-organization",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "Organization ID",
+ "name": "organization",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.Group"
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "consumes": ["application/json"],
+ "produces": ["application/json"],
+ "tags": ["Templates"],
+ "summary": "Create group for organization",
+ "operationId": "create-group-for-organization",
+ "parameters": [
+ {
+ "description": "Create group request",
+ "name": "request",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/codersdk.CreateGroupRequest"
+ }
+ },
+ {
+ "type": "string",
+ "description": "Organization ID",
+ "name": "organization",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "Created",
+ "schema": {
+ "$ref": "#/definitions/codersdk.Group"
+ }
+ }
+ }
+ }
+ },
"/organizations/{organization}/members/roles": {
"get": {
"security": [
@@ -506,6 +796,68 @@
}
}
},
+ "/organizations/{organization}/provisionerdaemons": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Enterprise"],
+ "summary": "Get provisioner daemons",
+ "operationId": "get-provisioner-daemons",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "Organization ID",
+ "name": "organization",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.ProvisionerDaemon"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/organizations/{organization}/provisionerdaemons/serve": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Enterprise"],
+ "summary": "Serve provisioner daemon",
+ "operationId": "serve-provisioner-daemon",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "Organization ID",
+ "name": "organization",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "101": {
+ "description": "Switching Protocols"
+ }
+ }
+ }
+ },
"/organizations/{organization}/templates": {
"get": {
"security": [
@@ -902,6 +1254,128 @@
}
}
},
+ "/replicas": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Enterprise"],
+ "summary": "Get active replicas",
+ "operationId": "get-active-replicas",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.Replica"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/scim/v2/Users": {
+ "post": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Enterprise"],
+ "summary": "SCIM 2.0: Create new user",
+ "operationId": "scim-create-new-user",
+ "parameters": [
+ {
+ "description": "New user",
+ "name": "request",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/coderd.SCIMUser"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/coderd.SCIMUser"
+ }
+ }
+ }
+ }
+ },
+ "/scim/v2/Users/{id}": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/scim+json"],
+ "tags": ["Enterprise"],
+ "summary": "SCIM 2.0: Get user by ID",
+ "operationId": "scim-get-user-by-id",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "User ID",
+ "name": "id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "404": {
+ "description": "Not Found"
+ }
+ }
+ },
+ "patch": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/scim+json"],
+ "tags": ["Enterprise"],
+ "summary": "SCIM 2.0: Update user account",
+ "operationId": "scim-update-user-status",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "User ID",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "Update user request",
+ "name": "request",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/coderd.SCIMUser"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/codersdk.User"
+ }
+ }
+ }
+ }
+ },
"/templates/{id}": {
"get": {
"security": [
@@ -1155,6 +1629,78 @@
}
}
},
+ "/templates/{template}/acl": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Enterprise"],
+ "summary": "Get template ACLs",
+ "operationId": "get-template-acls",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "Template ID",
+ "name": "template",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.TemplateUser"
+ }
+ }
+ }
+ }
+ },
+ "patch": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Enterprise"],
+ "summary": "Update template ACL",
+ "operationId": "update-template-acl",
+ "parameters": [
+ {
+ "type": "string",
+ "format": "uuid",
+ "description": "Template ID",
+ "name": "template",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "Update template request",
+ "name": "request",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/codersdk.UpdateTemplateACL"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/codersdk.Response"
+ }
+ }
+ }
+ }
+ },
"/templateversions/{templateversion}": {
"get": {
"security": [
@@ -2514,6 +3060,36 @@
}
}
},
+ "/workspace-quota/{user}": {
+ "get": {
+ "security": [
+ {
+ "CoderSessionToken": []
+ }
+ ],
+ "produces": ["application/json"],
+ "tags": ["Enterprise"],
+ "summary": "Get workspace quota by user",
+ "operationId": "get-workspace-quota-by-user",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "User ID, name, or me",
+ "name": "user",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/codersdk.WorkspaceQuota"
+ }
+ }
+ }
+ }
+ },
"/workspaceagents/aws-instance-identity": {
"post": {
"security": [
@@ -3366,6 +3942,70 @@
}
},
"definitions": {
+ "coderd.SCIMUser": {
+ "type": "object",
+ "properties": {
+ "active": {
+ "type": "boolean"
+ },
+ "emails": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "display": {
+ "type": "string"
+ },
+ "primary": {
+ "type": "boolean"
+ },
+ "type": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string",
+ "format": "email"
+ }
+ }
+ }
+ },
+ "groups": {
+ "type": "array",
+ "items": {}
+ },
+ "id": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "properties": {
+ "resourceType": {
+ "type": "string"
+ }
+ }
+ },
+ "name": {
+ "type": "object",
+ "properties": {
+ "familyName": {
+ "type": "string"
+ },
+ "givenName": {
+ "type": "string"
+ }
+ }
+ },
+ "schemas": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "userName": {
+ "type": "string"
+ }
+ }
+ },
"coderd.cspViolation": {
"type": "object",
"properties": {
@@ -3428,7 +4068,6 @@
"format": "date-time"
},
"user_id": {
- "description": "NOTE: do not ever return the HashedSecret",
"type": "string",
"format": "uuid"
}
@@ -3451,6 +4090,15 @@
}
}
},
+ "codersdk.AddLicenseRequest": {
+ "type": "object",
+ "required": ["license"],
+ "properties": {
+ "license": {
+ "type": "string"
+ }
+ }
+ },
"codersdk.AgentGitSSHKey": {
"type": "object",
"properties": {
@@ -3503,6 +4151,17 @@
}
}
},
+ "codersdk.AppearanceConfig": {
+ "type": "object",
+ "properties": {
+ "logo_url": {
+ "type": "string"
+ },
+ "service_banner": {
+ "$ref": "#/definitions/codersdk.ServiceBannerConfig"
+ }
+ }
+ },
"codersdk.AssignableRoles": {
"type": "object",
"properties": {
@@ -3758,6 +4417,20 @@
}
}
},
+ "codersdk.CreateGroupRequest": {
+ "type": "object",
+ "properties": {
+ "avatar_url": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "quota_allowance": {
+ "type": "integer"
+ }
+ }
+ },
"codersdk.CreateOrganizationRequest": {
"type": "object",
"required": ["name"],
@@ -4350,6 +5023,64 @@
}
}
},
+ "codersdk.Entitlement": {
+ "type": "string",
+ "enum": ["entitled", "grace_period", "not_entitled"],
+ "x-enum-varnames": [
+ "EntitlementEntitled",
+ "EntitlementGracePeriod",
+ "EntitlementNotEntitled"
+ ]
+ },
+ "codersdk.Entitlements": {
+ "type": "object",
+ "properties": {
+ "errors": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "experimental": {
+ "type": "boolean"
+ },
+ "features": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/codersdk.Feature"
+ }
+ },
+ "has_license": {
+ "type": "boolean"
+ },
+ "trial": {
+ "type": "boolean"
+ },
+ "warnings": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "codersdk.Feature": {
+ "type": "object",
+ "properties": {
+ "actual": {
+ "type": "integer"
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "entitlement": {
+ "$ref": "#/definitions/codersdk.Entitlement"
+ },
+ "limit": {
+ "type": "integer"
+ }
+ }
+ },
"codersdk.GenerateAPIKeyResponse": {
"type": "object",
"properties": {
@@ -4445,6 +5176,34 @@
}
}
},
+ "codersdk.Group": {
+ "type": "object",
+ "properties": {
+ "avatar_url": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid"
+ },
+ "members": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.User"
+ }
+ },
+ "name": {
+ "type": "string"
+ },
+ "organization_id": {
+ "type": "string",
+ "format": "uuid"
+ },
+ "quota_allowance": {
+ "type": "integer"
+ }
+ }
+ },
"codersdk.Healthcheck": {
"type": "object",
"properties": {
@@ -4462,6 +5221,27 @@
}
}
},
+ "codersdk.License": {
+ "type": "object",
+ "properties": {
+ "claims": {
+ "description": "Claims are the JWT claims asserted by the license. Here we use\na generic string map to ensure that all data from the server is\nparsed verbatim, not just the fields this version of Coder\nunderstands.",
+ "type": "object",
+ "additionalProperties": true
+ },
+ "id": {
+ "type": "integer"
+ },
+ "uploaded_at": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "uuid": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ },
"codersdk.LogLevel": {
"type": "string",
"enum": ["trace", "debug", "info", "warn", "error"],
@@ -4829,6 +5609,42 @@
}
}
},
+ "codersdk.ProvisionerDaemon": {
+ "type": "object",
+ "properties": {
+ "created_at": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid"
+ },
+ "name": {
+ "type": "string"
+ },
+ "provisioners": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "tags": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "updated_at": {
+ "format": "date-time",
+ "allOf": [
+ {
+ "$ref": "#/definitions/sql.NullTime"
+ }
+ ]
+ }
+ }
+ },
"codersdk.ProvisionerJob": {
"type": "object",
"properties": {
@@ -4954,6 +5770,41 @@
}
}
},
+ "codersdk.Replica": {
+ "type": "object",
+ "properties": {
+ "created_at": {
+ "description": "CreatedAt is the timestamp when the replica was first seen.",
+ "type": "string",
+ "format": "date-time"
+ },
+ "database_latency": {
+ "description": "DatabaseLatency is the latency in microseconds to the database.",
+ "type": "integer"
+ },
+ "error": {
+ "description": "Error is the replica error.",
+ "type": "string"
+ },
+ "hostname": {
+ "description": "Hostname is the hostname of the replica.",
+ "type": "string"
+ },
+ "id": {
+ "description": "ID is the unique identifier for the replica.",
+ "type": "string",
+ "format": "uuid"
+ },
+ "region_id": {
+ "description": "RegionID is the region of the replica.",
+ "type": "integer"
+ },
+ "relay_address": {
+ "description": "RelayAddress is the accessible address to relay DERP connections.",
+ "type": "string"
+ }
+ }
+ },
"codersdk.ResourceType": {
"type": "string",
"enum": [
@@ -5010,6 +5861,20 @@
}
}
},
+ "codersdk.ServiceBannerConfig": {
+ "type": "object",
+ "properties": {
+ "background_color": {
+ "type": "string"
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ },
"codersdk.SwaggerConfig": {
"type": "object",
"properties": {
@@ -5178,6 +6043,73 @@
}
}
},
+ "codersdk.TemplateRole": {
+ "type": "string",
+ "enum": ["admin", "use", ""],
+ "x-enum-varnames": [
+ "TemplateRoleAdmin",
+ "TemplateRoleUse",
+ "TemplateRoleDeleted"
+ ]
+ },
+ "codersdk.TemplateUser": {
+ "type": "object",
+ "required": ["created_at", "email", "id", "username"],
+ "properties": {
+ "avatar_url": {
+ "type": "string",
+ "format": "uri"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "email": {
+ "type": "string",
+ "format": "email"
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid"
+ },
+ "last_seen_at": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "organization_ids": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ "role": {
+ "enum": ["admin", "use"],
+ "allOf": [
+ {
+ "$ref": "#/definitions/codersdk.TemplateRole"
+ }
+ ]
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codersdk.Role"
+ }
+ },
+ "status": {
+ "enum": ["active", "suspended"],
+ "allOf": [
+ {
+ "$ref": "#/definitions/codersdk.UserStatus"
+ }
+ ]
+ },
+ "username": {
+ "type": "string"
+ }
+ }
+ },
"codersdk.TemplateVersion": {
"type": "object",
"properties": {
@@ -5280,6 +6212,23 @@
}
}
},
+ "codersdk.UpdateTemplateACL": {
+ "type": "object",
+ "properties": {
+ "group_perms": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/codersdk.TemplateRole"
+ }
+ },
+ "user_perms": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/codersdk.TemplateRole"
+ }
+ }
+ }
+ },
"codersdk.UpdateUserPasswordRequest": {
"type": "object",
"required": ["password"],
@@ -5788,6 +6737,17 @@
}
}
},
+ "codersdk.WorkspaceQuota": {
+ "type": "object",
+ "properties": {
+ "budget": {
+ "type": "integer"
+ },
+ "credits_consumed": {
+ "type": "integer"
+ }
+ }
+ },
"codersdk.WorkspaceResource": {
"type": "object",
"properties": {
@@ -5968,6 +6928,18 @@
}
}
},
+ "sql.NullTime": {
+ "type": "object",
+ "properties": {
+ "time": {
+ "type": "string"
+ },
+ "valid": {
+ "description": "Valid is true if Time is not NULL",
+ "type": "boolean"
+ }
+ }
+ },
"tailcfg.DERPMap": {
"type": "object",
"properties": {
diff --git a/codersdk/apikey.go b/codersdk/apikey.go
index fd896a0d29b4a..739fe7d255a3c 100644
--- a/codersdk/apikey.go
+++ b/codersdk/apikey.go
@@ -10,9 +10,9 @@ import (
"github.com/google/uuid"
)
+// APIKey: do not ever return the HashedSecret
type APIKey struct {
- ID string `json:"id" validate:"required"`
- // NOTE: do not ever return the HashedSecret
+ ID string `json:"id" validate:"required"`
UserID uuid.UUID `json:"user_id" validate:"required" format:"uuid"`
LastUsed time.Time `json:"last_used" validate:"required" format:"date-time"`
ExpiresAt time.Time `json:"expires_at" validate:"required" format:"date-time"`
diff --git a/codersdk/groups.go b/codersdk/groups.go
index 0647efd6e9d93..b0608f3530a3d 100644
--- a/codersdk/groups.go
+++ b/codersdk/groups.go
@@ -17,9 +17,9 @@ type CreateGroupRequest struct {
}
type Group struct {
- ID uuid.UUID `json:"id"`
+ ID uuid.UUID `json:"id" format:"uuid"`
Name string `json:"name"`
- OrganizationID uuid.UUID `json:"organization_id"`
+ OrganizationID uuid.UUID `json:"organization_id" format:"uuid"`
Members []User `json:"members"`
AvatarURL string `json:"avatar_url"`
QuotaAllowance int `json:"quota_allowance"`
diff --git a/codersdk/licenses.go b/codersdk/licenses.go
index 73118de5fdb32..3ede213e53251 100644
--- a/codersdk/licenses.go
+++ b/codersdk/licenses.go
@@ -16,8 +16,8 @@ type AddLicenseRequest struct {
type License struct {
ID int32 `json:"id"`
- UUID uuid.UUID `json:"uuid"`
- UploadedAt time.Time `json:"uploaded_at"`
+ UUID uuid.UUID `json:"uuid" format:"uuid"`
+ UploadedAt time.Time `json:"uploaded_at" format:"date-time"`
// 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
diff --git a/codersdk/provisionerdaemons.go b/codersdk/provisionerdaemons.go
index da0d2b67d0910..c1b85345d0ba2 100644
--- a/codersdk/provisionerdaemons.go
+++ b/codersdk/provisionerdaemons.go
@@ -37,9 +37,9 @@ const (
)
type ProvisionerDaemon struct {
- ID uuid.UUID `json:"id"`
- CreatedAt time.Time `json:"created_at"`
- UpdatedAt sql.NullTime `json:"updated_at"`
+ ID uuid.UUID `json:"id" format:"uuid"`
+ CreatedAt time.Time `json:"created_at" format:"date-time"`
+ UpdatedAt sql.NullTime `json:"updated_at" format:"date-time"`
Name string `json:"name"`
Provisioners []ProvisionerType `json:"provisioners"`
Tags map[string]string `json:"tags"`
diff --git a/codersdk/replicas.go b/codersdk/replicas.go
index e74af021ee9a3..756ebcfcb756d 100644
--- a/codersdk/replicas.go
+++ b/codersdk/replicas.go
@@ -12,16 +12,16 @@ import (
type Replica struct {
// ID is the unique identifier for the replica.
- ID uuid.UUID `json:"id"`
+ ID uuid.UUID `json:"id" format:"uuid"`
// Hostname is the hostname of the replica.
Hostname string `json:"hostname"`
- // CreatedAt is when the replica was first seen.
- CreatedAt time.Time `json:"created_at"`
+ // CreatedAt is the timestamp when the replica was first seen.
+ CreatedAt time.Time `json:"created_at" format:"date-time"`
// RelayAddress is the accessible address to relay DERP connections.
RelayAddress string `json:"relay_address"`
// RegionID is the region of the replica.
RegionID int32 `json:"region_id"`
- // Error is the error.
+ // Error is the replica error.
Error string `json:"error"`
// DatabaseLatency is the latency in microseconds to the database.
DatabaseLatency int32 `json:"database_latency"`
diff --git a/codersdk/templates.go b/codersdk/templates.go
index fce8b6f4c4f5c..bf00bd7e3de9a 100644
--- a/codersdk/templates.go
+++ b/codersdk/templates.go
@@ -60,12 +60,12 @@ type TemplateACL struct {
type TemplateGroup struct {
Group
- Role TemplateRole `json:"role"`
+ Role TemplateRole `json:"role" enums:"admin,use"`
}
type TemplateUser struct {
User
- Role TemplateRole `json:"role"`
+ Role TemplateRole `json:"role" enums:"admin,use"`
}
type UpdateTemplateACL struct {
diff --git a/docs/api/builds.md b/docs/api/builds.md
index cf904167770a6..d69028c041b17 100644
--- a/docs/api/builds.md
+++ b/docs/api/builds.md
@@ -515,61 +515,61 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
Status Code **200**
-| Name | Type | Required | Restrictions | Description |
-| ------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `[array item]` | array | false | | |
-| `» agents` | array | false | | |
-| `»» apps` | array | false | | |
-| `»»» command` | string | false | | |
-| `»»» display_name` | string | false | | DisplayName is a friendly name for the app. |
-| `»»» external` | boolean | false | | External specifies whether the URL should be opened externally on
the client or not. |
-| `»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
-| `»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
-| `»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
-| `»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
-| `»»»» url` | string | false | | URL specifies the endpoint to check for the app health. |
-| `»»» icon` | string | false | | Icon is a relative path or external URL that specifies
an icon to be displayed in the dashboard. |
-| `»»» id` | string(uuid) | false | | |
-| `»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
-| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
-| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the
`coder server` or via a hostname-based dev URL. If this is set to true
and there is no app wildcard configured on the server, the app will not
be accessible in the UI. |
-| `»»» url` | string | false | | URL is the address being proxied to inside the workspace.
If external is specified, this will be opened on the client. |
-| `»» architecture` | string | false | | |
-| `»» connection_timeout_seconds` | integer | false | | |
-| `»» created_at` | string(date-time) | false | | |
-| `»» directory` | string | false | | |
-| `»» disconnected_at` | string(date-time) | false | | |
-| `»» environment_variables` | object | false | | |
-| `»»» [any property]` | string | false | | |
-| `»» first_connected_at` | string(date-time) | false | | |
-| `»» id` | string(uuid) | false | | |
-| `»» instance_id` | string | false | | |
-| `»» last_connected_at` | string(date-time) | false | | |
-| `»» latency` | object | false | | DERPLatency is mapped by region name (e.g. "New York City", "Seattle"). |
-| `»»» [any property]` | [codersdk.DERPRegion](schemas.md#codersdkderpregion) | false | | |
-| `»»»» latency_ms` | number | false | | |
-| `»»»» preferred` | boolean | false | | |
-| `»» name` | string | false | | |
-| `»» operating_system` | string | false | | |
-| `»» resource_id` | string(uuid) | false | | |
-| `»» startup_script` | string | false | | |
-| `»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
-| `»» troubleshooting_url` | string | false | | |
-| `»» updated_at` | string(date-time) | false | | |
-| `»» version` | string | false | | |
-| `» created_at` | string(date-time) | false | | |
-| `» daily_cost` | integer | false | | |
-| `» hide` | boolean | false | | |
-| `» icon` | string | false | | |
-| `» id` | string(uuid) | false | | |
-| `» job_id` | string(uuid) | false | | |
-| `» metadata` | array | false | | |
-| `»» key` | string | false | | |
-| `»» sensitive` | boolean | false | | |
-| `»» value` | string | false | | |
-| `» name` | string | false | | |
-| `» type` | string | false | | |
-| `» workspace_transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
+| Name | Type | Required | Restrictions | Description |
+| ------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `[array item]` | array | false | | |
+| `» agents` | array | false | | |
+| `»» apps` | array | false | | |
+| `»»» command` | string | false | | |
+| `»»» display_name` | string | false | | »»display name is a friendly name for the app. |
+| `»»» external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
+| `»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
+| `»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
+| `»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
+| `»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
+| `»»»» url` | string | false | | »»»url specifies the endpoint to check for the app health. |
+| `»»» icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
+| `»»» id` | string(uuid) | false | | |
+| `»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
+| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
+| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
+| `»»» url` | string | false | | »»url is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
+| `»» architecture` | string | false | | |
+| `»» connection_timeout_seconds` | integer | false | | |
+| `»» created_at` | string(date-time) | false | | |
+| `»» directory` | string | false | | |
+| `»» disconnected_at` | string(date-time) | false | | |
+| `»» environment_variables` | object | false | | |
+| `»»» [any property]` | string | false | | |
+| `»» first_connected_at` | string(date-time) | false | | |
+| `»» id` | string(uuid) | false | | |
+| `»» instance_id` | string | false | | |
+| `»» last_connected_at` | string(date-time) | false | | |
+| `»» latency` | object | false | | »latency is mapped by region name (e.g. "New York City", "Seattle"). |
+| `»»» [any property]` | [codersdk.DERPRegion](schemas.md#codersdkderpregion) | false | | |
+| `»»»» latency_ms` | number | false | | |
+| `»»»» preferred` | boolean | false | | |
+| `»» name` | string | false | | |
+| `»» operating_system` | string | false | | |
+| `»» resource_id` | string(uuid) | false | | |
+| `»» startup_script` | string | false | | |
+| `»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
+| `»» troubleshooting_url` | string | false | | |
+| `»» updated_at` | string(date-time) | false | | |
+| `»» version` | string | false | | |
+| `» created_at` | string(date-time) | false | | |
+| `» daily_cost` | integer | false | | |
+| `» hide` | boolean | false | | |
+| `» icon` | string | false | | |
+| `» id` | string(uuid) | false | | |
+| `» job_id` | string(uuid) | false | | |
+| `» metadata` | array | false | | |
+| `»» key` | string | false | | |
+| `»» sensitive` | boolean | false | | |
+| `»» value` | string | false | | |
+| `» name` | string | false | | |
+| `» type` | string | false | | |
+| `» workspace_transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
#### Enumerated Values
@@ -884,91 +884,91 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{id}/builds \
Status Code **200**
-| Name | Type | Required | Restrictions | Description |
-| -------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `[array item]` | array | false | | |
-| `» build_number` | integer | false | | |
-| `» created_at` | string(date-time) | false | | |
-| `» daily_cost` | integer | false | | |
-| `» deadline` | string(date-time) | false | | |
-| `» id` | string(uuid) | false | | |
-| `» initiator_id` | string(uuid) | false | | |
-| `» initiator_name` | string | false | | |
-| `» job` | [codersdk.ProvisionerJob](schemas.md#codersdkprovisionerjob) | false | | |
-| `»» canceled_at` | string(date-time) | false | | |
-| `»» completed_at` | string(date-time) | false | | |
-| `»» created_at` | string(date-time) | false | | |
-| `»» error` | string | false | | |
-| `»» file_id` | string(uuid) | false | | |
-| `»» id` | string(uuid) | false | | |
-| `»» started_at` | string(date-time) | false | | |
-| `»» status` | [codersdk.ProvisionerJobStatus](schemas.md#codersdkprovisionerjobstatus) | false | | |
-| `»» tags` | object | false | | |
-| `»»» [any property]` | string | false | | |
-| `»» worker_id` | string(uuid) | false | | |
-| `» reason` | [codersdk.BuildReason](schemas.md#codersdkbuildreason) | false | | |
-| `» resources` | array | false | | |
-| `»» agents` | array | false | | |
-| `»»» apps` | array | false | | |
-| `»»»» command` | string | false | | |
-| `»»»» display_name` | string | false | | DisplayName is a friendly name for the app. |
-| `»»»» external` | boolean | false | | External specifies whether the URL should be opened externally on
the client or not. |
-| `»»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
-| `»»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
-| `»»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
-| `»»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
-| `»»»»» url` | string | false | | URL specifies the endpoint to check for the app health. |
-| `»»»» icon` | string | false | | Icon is a relative path or external URL that specifies
an icon to be displayed in the dashboard. |
-| `»»»» id` | string(uuid) | false | | |
-| `»»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
-| `»»»» slug` | string | false | | Slug is a unique identifier within the agent. |
-| `»»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the
`coder server` or via a hostname-based dev URL. If this is set to true
and there is no app wildcard configured on the server, the app will not
be accessible in the UI. |
-| `»»»» url` | string | false | | URL is the address being proxied to inside the workspace.
If external is specified, this will be opened on the client. |
-| `»»» architecture` | string | false | | |
-| `»»» connection_timeout_seconds` | integer | false | | |
-| `»»» created_at` | string(date-time) | false | | |
-| `»»» directory` | string | false | | |
-| `»»» disconnected_at` | string(date-time) | false | | |
-| `»»» environment_variables` | object | false | | |
-| `»»»» [any property]` | string | false | | |
-| `»»» first_connected_at` | string(date-time) | false | | |
-| `»»» id` | string(uuid) | false | | |
-| `»»» instance_id` | string | false | | |
-| `»»» last_connected_at` | string(date-time) | false | | |
-| `»»» latency` | object | false | | DERPLatency is mapped by region name (e.g. "New York City", "Seattle"). |
-| `»»»» [any property]` | [codersdk.DERPRegion](schemas.md#codersdkderpregion) | false | | |
-| `»»»»» latency_ms` | number | false | | |
-| `»»»»» preferred` | boolean | false | | |
-| `»»» name` | string | false | | |
-| `»»» operating_system` | string | false | | |
-| `»»» resource_id` | string(uuid) | false | | |
-| `»»» startup_script` | string | false | | |
-| `»»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
-| `»»» troubleshooting_url` | string | false | | |
-| `»»» updated_at` | string(date-time) | false | | |
-| `»»» version` | string | false | | |
-| `»» created_at` | string(date-time) | false | | |
-| `»» daily_cost` | integer | false | | |
-| `»» hide` | boolean | false | | |
-| `»» icon` | string | false | | |
-| `»» id` | string(uuid) | false | | |
-| `»» job_id` | string(uuid) | false | | |
-| `»» metadata` | array | false | | |
-| `»»» key` | string | false | | |
-| `»»» sensitive` | boolean | false | | |
-| `»»» value` | string | false | | |
-| `»» name` | string | false | | |
-| `»» type` | string | false | | |
-| `»» workspace_transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
-| `» status` | [codersdk.WorkspaceStatus](schemas.md#codersdkworkspacestatus) | false | | |
-| `» template_version_id` | string(uuid) | false | | |
-| `» template_version_name` | string | false | | |
-| `» transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
-| `» updated_at` | string(date-time) | false | | |
-| `» workspace_id` | string(uuid) | false | | |
-| `» workspace_name` | string | false | | |
-| `» workspace_owner_id` | string(uuid) | false | | |
-| `» workspace_owner_name` | string | false | | |
+| Name | Type | Required | Restrictions | Description |
+| -------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `[array item]` | array | false | | |
+| `» build_number` | integer | false | | |
+| `» created_at` | string(date-time) | false | | |
+| `» daily_cost` | integer | false | | |
+| `» deadline` | string(date-time) | false | | |
+| `» id` | string(uuid) | false | | |
+| `» initiator_id` | string(uuid) | false | | |
+| `» initiator_name` | string | false | | |
+| `» job` | [codersdk.ProvisionerJob](schemas.md#codersdkprovisionerjob) | false | | |
+| `»» canceled_at` | string(date-time) | false | | |
+| `»» completed_at` | string(date-time) | false | | |
+| `»» created_at` | string(date-time) | false | | |
+| `»» error` | string | false | | |
+| `»» file_id` | string(uuid) | false | | |
+| `»» id` | string(uuid) | false | | |
+| `»» started_at` | string(date-time) | false | | |
+| `»» status` | [codersdk.ProvisionerJobStatus](schemas.md#codersdkprovisionerjobstatus) | false | | |
+| `»» tags` | object | false | | |
+| `»»» [any property]` | string | false | | |
+| `»» worker_id` | string(uuid) | false | | |
+| `» reason` | [codersdk.BuildReason](schemas.md#codersdkbuildreason) | false | | |
+| `» resources` | array | false | | |
+| `»» agents` | array | false | | |
+| `»»» apps` | array | false | | |
+| `»»»» command` | string | false | | |
+| `»»»» display_name` | string | false | | »»»display name is a friendly name for the app. |
+| `»»»» external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
+| `»»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
+| `»»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
+| `»»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
+| `»»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
+| `»»»»» url` | string | false | | »»»»url specifies the endpoint to check for the app health. |
+| `»»»» icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
+| `»»»» id` | string(uuid) | false | | |
+| `»»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
+| `»»»» slug` | string | false | | Slug is a unique identifier within the agent. |
+| `»»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
+| `»»»» url` | string | false | | »»»url is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
+| `»»» architecture` | string | false | | |
+| `»»» connection_timeout_seconds` | integer | false | | |
+| `»»» created_at` | string(date-time) | false | | |
+| `»»» directory` | string | false | | |
+| `»»» disconnected_at` | string(date-time) | false | | |
+| `»»» environment_variables` | object | false | | |
+| `»»»» [any property]` | string | false | | |
+| `»»» first_connected_at` | string(date-time) | false | | |
+| `»»» id` | string(uuid) | false | | |
+| `»»» instance_id` | string | false | | |
+| `»»» last_connected_at` | string(date-time) | false | | |
+| `»»» latency` | object | false | | »»latency is mapped by region name (e.g. "New York City", "Seattle"). |
+| `»»»» [any property]` | [codersdk.DERPRegion](schemas.md#codersdkderpregion) | false | | |
+| `»»»»» latency_ms` | number | false | | |
+| `»»»»» preferred` | boolean | false | | |
+| `»»» name` | string | false | | |
+| `»»» operating_system` | string | false | | |
+| `»»» resource_id` | string(uuid) | false | | |
+| `»»» startup_script` | string | false | | |
+| `»»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
+| `»»» troubleshooting_url` | string | false | | |
+| `»»» updated_at` | string(date-time) | false | | |
+| `»»» version` | string | false | | |
+| `»» created_at` | string(date-time) | false | | |
+| `»» daily_cost` | integer | false | | |
+| `»» hide` | boolean | false | | |
+| `»» icon` | string | false | | |
+| `»» id` | string(uuid) | false | | |
+| `»» job_id` | string(uuid) | false | | |
+| `»» metadata` | array | false | | |
+| `»»» key` | string | false | | |
+| `»»» sensitive` | boolean | false | | |
+| `»»» value` | string | false | | |
+| `»» name` | string | false | | |
+| `»» type` | string | false | | |
+| `»» workspace_transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
+| `» status` | [codersdk.WorkspaceStatus](schemas.md#codersdkworkspacestatus) | false | | |
+| `» template_version_id` | string(uuid) | false | | |
+| `» template_version_name` | string | false | | |
+| `» transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
+| `» updated_at` | string(date-time) | false | | |
+| `» workspace_id` | string(uuid) | false | | |
+| `» workspace_name` | string | false | | |
+| `» workspace_owner_id` | string(uuid) | false | | |
+| `» workspace_owner_name` | string | false | | |
#### Enumerated Values
diff --git a/docs/api/enterprise.md b/docs/api/enterprise.md
new file mode 100644
index 0000000000000..b6df74df03153
--- /dev/null
+++ b/docs/api/enterprise.md
@@ -0,0 +1,980 @@
+# Enterprise
+
+> This page is incomplete, stay tuned.
+
+## Get appearance
+
+### Code samples
+
+```shell
+# Example request using curl
+curl -X GET http://coder-server:8080/api/v2/appearance \
+ -H 'Accept: application/json' \
+ -H 'Coder-Session-Token: API_KEY'
+```
+
+`GET /appearance`
+
+### Example responses
+
+> 200 Response
+
+```json
+{
+ "logo_url": "string",
+ "service_banner": {
+ "background_color": "string",
+ "enabled": true,
+ "message": "string"
+ }
+}
+```
+
+### Responses
+
+| Status | Meaning | Description | Schema |
+| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------- |
+| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.AppearanceConfig](schemas.md#codersdkappearanceconfig) |
+
+To perform this operation, you must be authenticated. [Learn more](authentication.md).
+
+## Update appearance
+
+### Code samples
+
+```shell
+# Example request using curl
+curl -X PUT http://coder-server:8080/api/v2/appearance \
+ -H 'Content-Type: application/json' \
+ -H 'Accept: application/json' \
+ -H 'Coder-Session-Token: API_KEY'
+```
+
+`PUT /appearance`
+
+> Body parameter
+
+```json
+{
+ "logo_url": "string",
+ "service_banner": {
+ "background_color": "string",
+ "enabled": true,
+ "message": "string"
+ }
+}
+```
+
+### Parameters
+
+| Name | In | Type | Required | Description |
+| ------ | ---- | ---------------------------------------------------------------- | -------- | ------------------------- |
+| `body` | body | [codersdk.AppearanceConfig](schemas.md#codersdkappearanceconfig) | true | Update appearance request |
+
+### Example responses
+
+> 200 Response
+
+```json
+{
+ "logo_url": "string",
+ "service_banner": {
+ "background_color": "string",
+ "enabled": true,
+ "message": "string"
+ }
+}
+```
+
+### Responses
+
+| Status | Meaning | Description | Schema |
+| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------- |
+| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.AppearanceConfig](schemas.md#codersdkappearanceconfig) |
+
+To perform this operation, you must be authenticated. [Learn more](authentication.md).
+
+## Get entitlements
+
+### Code samples
+
+```shell
+# Example request using curl
+curl -X GET http://coder-server:8080/api/v2/entitlements \
+ -H 'Accept: application/json' \
+ -H 'Coder-Session-Token: API_KEY'
+```
+
+`GET /entitlements`
+
+### Example responses
+
+> 200 Response
+
+```json
+{
+ "errors": ["string"],
+ "experimental": true,
+ "features": {
+ "property1": {
+ "actual": 0,
+ "enabled": true,
+ "entitlement": "entitled",
+ "limit": 0
+ },
+ "property2": {
+ "actual": 0,
+ "enabled": true,
+ "entitlement": "entitled",
+ "limit": 0
+ }
+ },
+ "has_license": true,
+ "trial": true,
+ "warnings": ["string"]
+}
+```
+
+### Responses
+
+| Status | Meaning | Description | Schema |
+| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------- |
+| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.Entitlements](schemas.md#codersdkentitlements) |
+
+To perform this operation, you must be authenticated. [Learn more](authentication.md).
+
+## Get groups
+
+### Code samples
+
+```shell
+# Example request using curl
+curl -X GET http://coder-server:8080/api/v2/groups \
+ -H 'Accept: application/json' \
+ -H 'Coder-Session-Token: API_KEY'
+```
+
+`GET /groups`
+
+### Parameters
+
+| Name | In | Type | Required | Description |
+| -------------- | ---- | ------------ | -------- | --------------- |
+| `organization` | path | string(uuid) | true | Organization ID |
+
+### Example responses
+
+> 200 Response
+
+```json
+[
+ {
+ "avatar_url": "string",
+ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
+ "members": [
+ {
+ "avatar_url": "http://example.com",
+ "created_at": "2019-08-24T14:15:22Z",
+ "email": "user@example.com",
+ "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
+ }
+]
+```
+
+### Responses
+
+| Status | Meaning | Description | Schema |
+| ------ | ------------------------------------------------------- | ----------- | --------------------------------------------------- |
+| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.Group](schemas.md#codersdkgroup) |
+
+