mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: correct SCIM Swagger try it out URLs (#24779)
This commit is contained in:
@@ -107,7 +107,7 @@ func aibridgeHandler(api *API, middlewares ...func(http.Handler) http.Handler) f
|
||||
// @Param after_id query string false "Cursor pagination after ID (cannot be used with offset)"
|
||||
// @Param offset query int false "Offset pagination (cannot be used with after_id)"
|
||||
// @Success 200 {object} codersdk.AIBridgeListInterceptionsResponse
|
||||
// @Router /aibridge/interceptions [get]
|
||||
// @Router /api/v2/aibridge/interceptions [get]
|
||||
// @Deprecated Use /aibridge/sessions instead.
|
||||
func (api *API) aiBridgeListInterceptions(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
@@ -221,7 +221,7 @@ func (api *API) aiBridgeListInterceptions(rw http.ResponseWriter, r *http.Reques
|
||||
// @Param after_session_id query string false "Cursor pagination after session ID (cannot be used with offset)"
|
||||
// @Param offset query int false "Offset pagination (cannot be used with after_session_id)"
|
||||
// @Success 200 {object} codersdk.AIBridgeListSessionsResponse
|
||||
// @Router /aibridge/sessions [get]
|
||||
// @Router /api/v2/aibridge/sessions [get]
|
||||
func (api *API) aiBridgeListSessions(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
apiKey := httpmw.APIKey(r)
|
||||
@@ -346,7 +346,7 @@ func (api *API) aiBridgeListSessions(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Param before_id query string false "Thread pagination cursor (backward/newer)"
|
||||
// @Param limit query int false "Number of threads per page (default 50)"
|
||||
// @Success 200 {object} codersdk.AIBridgeSessionThreadsResponse
|
||||
// @Router /aibridge/sessions/{session_id} [get]
|
||||
// @Router /api/v2/aibridge/sessions/{session_id} [get]
|
||||
func (api *API) aiBridgeGetSessionThreads(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
@@ -533,7 +533,7 @@ func (api *API) aiBridgeGetSessionThreads(rw http.ResponseWriter, r *http.Reques
|
||||
// @Produce json
|
||||
// @Tags AI Bridge
|
||||
// @Success 200 {array} string
|
||||
// @Router /aibridge/models [get]
|
||||
// @Router /api/v2/aibridge/models [get]
|
||||
func (api *API) aiBridgeListModels(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
@@ -585,7 +585,7 @@ func (api *API) aiBridgeListModels(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Produce json
|
||||
// @Tags AI Bridge
|
||||
// @Success 200 {array} string
|
||||
// @Router /aibridge/clients [get]
|
||||
// @Router /api/v2/aibridge/clients [get]
|
||||
func (api *API) aiBridgeListClients(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
// @Produce json
|
||||
// @Tags Enterprise
|
||||
// @Success 200 {object} codersdk.AppearanceConfig
|
||||
// @Router /appearance [get]
|
||||
// @Router /api/v2/appearance [get]
|
||||
func (api *API) appearance(rw http.ResponseWriter, r *http.Request) {
|
||||
af := *api.AGPL.AppearanceFetcher.Load()
|
||||
cfg, err := af.Fetch(r.Context())
|
||||
@@ -141,7 +141,7 @@ func validateHexColor(color string) error {
|
||||
// @Tags Enterprise
|
||||
// @Param request body codersdk.UpdateAppearanceConfig true "Update appearance request"
|
||||
// @Success 200 {object} codersdk.UpdateAppearanceConfig
|
||||
// @Router /appearance [put]
|
||||
// @Router /api/v2/appearance [put]
|
||||
func (api *API) putAppearance(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
|
||||
@@ -1288,7 +1288,7 @@ func derpMapper(logger slog.Logger, proxyHealth *proxyhealth.ProxyHealth) func(*
|
||||
// @Produce json
|
||||
// @Tags Enterprise
|
||||
// @Success 200 {object} codersdk.Entitlements
|
||||
// @Router /entitlements [get]
|
||||
// @Router /api/v2/entitlements [get]
|
||||
func (api *API) serveEntitlements(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
httpapi.Write(ctx, rw, http.StatusOK, api.Entitlements.AsJSON())
|
||||
|
||||
@@ -18,5 +18,5 @@ func TestEnterpriseEndpointsDocumented(t *testing.T) {
|
||||
|
||||
//nolint: dogsled
|
||||
_, _, api, _ := coderdenttest.NewWithAPI(t, nil)
|
||||
coderdtest.VerifySwaggerDefinitions(t, api.AGPL.APIHandler, swaggerComments)
|
||||
coderdtest.VerifySwaggerDefinitions(t, api.AGPL.APIHandler, swaggerComments, coderdtest.WithSwaggerRoutePrefix("/api/v2"))
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ const connectionLogCountCap = 2000
|
||||
// @Param limit query int true "Page limit"
|
||||
// @Param offset query int false "Page offset"
|
||||
// @Success 200 {object} codersdk.ConnectionLogResponse
|
||||
// @Router /connectionlog [get]
|
||||
// @Router /api/v2/connectionlog [get]
|
||||
func (api *API) connectionLogs(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
apiKey := httpmw.APIKey(r)
|
||||
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
// @Param request body codersdk.CreateGroupRequest true "Create group request"
|
||||
// @Param organization path string true "Organization ID"
|
||||
// @Success 201 {object} codersdk.Group
|
||||
// @Router /organizations/{organization}/groups [post]
|
||||
// @Router /api/v2/organizations/{organization}/groups [post]
|
||||
func (api *API) postGroupByOrganization(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -98,7 +98,7 @@ func (api *API) postGroupByOrganization(rw http.ResponseWriter, r *http.Request)
|
||||
// @Param group path string true "Group name"
|
||||
// @Param request body codersdk.PatchGroupRequest true "Patch group request"
|
||||
// @Success 200 {object} codersdk.Group
|
||||
// @Router /groups/{group} [patch]
|
||||
// @Router /api/v2/groups/{group} [patch]
|
||||
func (api *API) patchGroup(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -332,7 +332,7 @@ func (api *API) patchGroup(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Tags Enterprise
|
||||
// @Param group path string true "Group name"
|
||||
// @Success 200 {object} codersdk.Group
|
||||
// @Router /groups/{group} [delete]
|
||||
// @Router /api/v2/groups/{group} [delete]
|
||||
func (api *API) deleteGroup(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -385,7 +385,7 @@ func (api *API) deleteGroup(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Param groupName path string true "Group name"
|
||||
// @Success 200 {object} codersdk.Group
|
||||
// @Router /organizations/{organization}/groups/{groupName} [get]
|
||||
// @Router /api/v2/organizations/{organization}/groups/{groupName} [get]
|
||||
func (api *API) groupByOrganization(rw http.ResponseWriter, r *http.Request) {
|
||||
api.group(rw, r)
|
||||
}
|
||||
@@ -398,7 +398,7 @@ func (api *API) groupByOrganization(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Param group path string true "Group id"
|
||||
// @Param exclude_members query bool false "Exclude members from the response"
|
||||
// @Success 200 {object} codersdk.Group
|
||||
// @Router /groups/{group} [get]
|
||||
// @Router /api/v2/groups/{group} [get]
|
||||
func (api *API) group(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -452,7 +452,7 @@ func (api *API) group(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Param limit query int false "Page limit"
|
||||
// @Param offset query int false "Page offset"
|
||||
// @Success 200 {object} codersdk.GroupMembersResponse
|
||||
// @Router /organizations/{organization}/groups/{groupName}/members [get]
|
||||
// @Router /api/v2/organizations/{organization}/groups/{groupName}/members [get]
|
||||
func (api *API) groupMembersByOrganization(rw http.ResponseWriter, r *http.Request) {
|
||||
api.groupMembers(rw, r)
|
||||
}
|
||||
@@ -468,7 +468,7 @@ func (api *API) groupMembersByOrganization(rw http.ResponseWriter, r *http.Reque
|
||||
// @Param limit query int false "Page limit"
|
||||
// @Param offset query int false "Page offset"
|
||||
// @Success 200 {object} codersdk.GroupMembersResponse
|
||||
// @Router /groups/{group}/members [get]
|
||||
// @Router /api/v2/groups/{group}/members [get]
|
||||
func (api *API) groupMembers(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -536,7 +536,7 @@ func (api *API) groupMembers(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Tags Enterprise
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Success 200 {array} codersdk.Group
|
||||
// @Router /organizations/{organization}/groups [get]
|
||||
// @Router /api/v2/organizations/{organization}/groups [get]
|
||||
func (api *API) groupsByOrganization(rw http.ResponseWriter, r *http.Request) {
|
||||
org := httpmw.OrganizationParam(r)
|
||||
|
||||
@@ -556,7 +556,7 @@ func (api *API) groupsByOrganization(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Param has_member query string true "User ID or name"
|
||||
// @Param group_ids query string true "Comma separated list of group IDs"
|
||||
// @Success 200 {array} codersdk.Group
|
||||
// @Router /groups [get]
|
||||
// @Router /api/v2/groups [get]
|
||||
func (api *API) groups(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
// @Tags Enterprise
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Success 200 {object} codersdk.GroupSyncSettings
|
||||
// @Router /organizations/{organization}/settings/idpsync/groups [get]
|
||||
// @Router /api/v2/organizations/{organization}/settings/idpsync/groups [get]
|
||||
func (api *API) groupIDPSyncSettings(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
org := httpmw.OrganizationParam(r)
|
||||
@@ -56,7 +56,7 @@ func (api *API) groupIDPSyncSettings(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Param request body codersdk.GroupSyncSettings true "New settings"
|
||||
// @Success 200 {object} codersdk.GroupSyncSettings
|
||||
// @Router /organizations/{organization}/settings/idpsync/groups [patch]
|
||||
// @Router /api/v2/organizations/{organization}/settings/idpsync/groups [patch]
|
||||
func (api *API) patchGroupIDPSyncSettings(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
org := httpmw.OrganizationParam(r)
|
||||
@@ -140,7 +140,7 @@ func (api *API) patchGroupIDPSyncSettings(rw http.ResponseWriter, r *http.Reques
|
||||
// @Success 200 {object} codersdk.GroupSyncSettings
|
||||
// @Param organization path string true "Organization ID or name" format(uuid)
|
||||
// @Param request body codersdk.PatchGroupIDPSyncConfigRequest true "New config values"
|
||||
// @Router /organizations/{organization}/settings/idpsync/groups/config [patch]
|
||||
// @Router /api/v2/organizations/{organization}/settings/idpsync/groups/config [patch]
|
||||
func (api *API) patchGroupIDPSyncConfig(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
org := httpmw.OrganizationParam(r)
|
||||
@@ -213,7 +213,7 @@ func (api *API) patchGroupIDPSyncConfig(rw http.ResponseWriter, r *http.Request)
|
||||
// @Success 200 {object} codersdk.GroupSyncSettings
|
||||
// @Param organization path string true "Organization ID or name" format(uuid)
|
||||
// @Param request body codersdk.PatchGroupIDPSyncMappingRequest true "Description of the mappings to add and remove"
|
||||
// @Router /organizations/{organization}/settings/idpsync/groups/mapping [patch]
|
||||
// @Router /api/v2/organizations/{organization}/settings/idpsync/groups/mapping [patch]
|
||||
func (api *API) patchGroupIDPSyncMapping(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
org := httpmw.OrganizationParam(r)
|
||||
@@ -285,7 +285,7 @@ func (api *API) patchGroupIDPSyncMapping(rw http.ResponseWriter, r *http.Request
|
||||
// @Tags Enterprise
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Success 200 {object} codersdk.RoleSyncSettings
|
||||
// @Router /organizations/{organization}/settings/idpsync/roles [get]
|
||||
// @Router /api/v2/organizations/{organization}/settings/idpsync/roles [get]
|
||||
func (api *API) roleIDPSyncSettings(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
org := httpmw.OrganizationParam(r)
|
||||
@@ -315,7 +315,7 @@ func (api *API) roleIDPSyncSettings(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Param request body codersdk.RoleSyncSettings true "New settings"
|
||||
// @Success 200 {object} codersdk.RoleSyncSettings
|
||||
// @Router /organizations/{organization}/settings/idpsync/roles [patch]
|
||||
// @Router /api/v2/organizations/{organization}/settings/idpsync/roles [patch]
|
||||
func (api *API) patchRoleIDPSyncSettings(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
org := httpmw.OrganizationParam(r)
|
||||
@@ -380,7 +380,7 @@ func (api *API) patchRoleIDPSyncSettings(rw http.ResponseWriter, r *http.Request
|
||||
// @Success 200 {object} codersdk.RoleSyncSettings
|
||||
// @Param organization path string true "Organization ID or name" format(uuid)
|
||||
// @Param request body codersdk.PatchRoleIDPSyncConfigRequest true "New config values"
|
||||
// @Router /organizations/{organization}/settings/idpsync/roles/config [patch]
|
||||
// @Router /api/v2/organizations/{organization}/settings/idpsync/roles/config [patch]
|
||||
func (api *API) patchRoleIDPSyncConfig(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
org := httpmw.OrganizationParam(r)
|
||||
@@ -447,7 +447,7 @@ func (api *API) patchRoleIDPSyncConfig(rw http.ResponseWriter, r *http.Request)
|
||||
// @Success 200 {object} codersdk.RoleSyncSettings
|
||||
// @Param organization path string true "Organization ID or name" format(uuid)
|
||||
// @Param request body codersdk.PatchRoleIDPSyncMappingRequest true "Description of the mappings to add and remove"
|
||||
// @Router /organizations/{organization}/settings/idpsync/roles/mapping [patch]
|
||||
// @Router /api/v2/organizations/{organization}/settings/idpsync/roles/mapping [patch]
|
||||
func (api *API) patchRoleIDPSyncMapping(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
org := httpmw.OrganizationParam(r)
|
||||
@@ -512,7 +512,7 @@ func (api *API) patchRoleIDPSyncMapping(rw http.ResponseWriter, r *http.Request)
|
||||
// @Produce json
|
||||
// @Tags Enterprise
|
||||
// @Success 200 {object} codersdk.OrganizationSyncSettings
|
||||
// @Router /settings/idpsync/organization [get]
|
||||
// @Router /api/v2/settings/idpsync/organization [get]
|
||||
func (api *API) organizationIDPSyncSettings(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
@@ -544,7 +544,7 @@ func (api *API) organizationIDPSyncSettings(rw http.ResponseWriter, r *http.Requ
|
||||
// @Tags Enterprise
|
||||
// @Success 200 {object} codersdk.OrganizationSyncSettings
|
||||
// @Param request body codersdk.OrganizationSyncSettings true "New settings"
|
||||
// @Router /settings/idpsync/organization [patch]
|
||||
// @Router /api/v2/settings/idpsync/organization [patch]
|
||||
func (api *API) patchOrganizationIDPSyncSettings(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
auditor := *api.AGPL.Auditor.Load()
|
||||
@@ -608,7 +608,7 @@ func (api *API) patchOrganizationIDPSyncSettings(rw http.ResponseWriter, r *http
|
||||
// @Tags Enterprise
|
||||
// @Success 200 {object} codersdk.OrganizationSyncSettings
|
||||
// @Param request body codersdk.PatchOrganizationIDPSyncConfigRequest true "New config values"
|
||||
// @Router /settings/idpsync/organization/config [patch]
|
||||
// @Router /api/v2/settings/idpsync/organization/config [patch]
|
||||
func (api *API) patchOrganizationIDPSyncConfig(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
auditor := *api.AGPL.Auditor.Load()
|
||||
@@ -674,7 +674,7 @@ func (api *API) patchOrganizationIDPSyncConfig(rw http.ResponseWriter, r *http.R
|
||||
// @Tags Enterprise
|
||||
// @Success 200 {object} codersdk.OrganizationSyncSettings
|
||||
// @Param request body codersdk.PatchOrganizationIDPSyncMappingRequest true "Description of the mappings to add and remove"
|
||||
// @Router /settings/idpsync/organization/mapping [patch]
|
||||
// @Router /api/v2/settings/idpsync/organization/mapping [patch]
|
||||
func (api *API) patchOrganizationIDPSyncMapping(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
auditor := *api.AGPL.Auditor.Load()
|
||||
@@ -740,7 +740,7 @@ func (api *API) patchOrganizationIDPSyncMapping(rw http.ResponseWriter, r *http.
|
||||
// @Tags Enterprise
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Success 200 {array} string
|
||||
// @Router /organizations/{organization}/settings/idpsync/available-fields [get]
|
||||
// @Router /api/v2/organizations/{organization}/settings/idpsync/available-fields [get]
|
||||
func (api *API) organizationIDPSyncClaimFields(rw http.ResponseWriter, r *http.Request) {
|
||||
org := httpmw.OrganizationParam(r)
|
||||
api.idpSyncClaimFields(org.ID, rw, r)
|
||||
@@ -753,7 +753,7 @@ func (api *API) organizationIDPSyncClaimFields(rw http.ResponseWriter, r *http.R
|
||||
// @Tags Enterprise
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Success 200 {array} string
|
||||
// @Router /settings/idpsync/available-fields [get]
|
||||
// @Router /api/v2/settings/idpsync/available-fields [get]
|
||||
func (api *API) deploymentIDPSyncClaimFields(rw http.ResponseWriter, r *http.Request) {
|
||||
// nil uuid implies all organizations
|
||||
api.idpSyncClaimFields(uuid.Nil, rw, r)
|
||||
@@ -788,7 +788,7 @@ func (api *API) idpSyncClaimFields(orgID uuid.UUID, rw http.ResponseWriter, r *h
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Param claimField query string true "Claim Field" format(string)
|
||||
// @Success 200 {array} string
|
||||
// @Router /organizations/{organization}/settings/idpsync/field-values [get]
|
||||
// @Router /api/v2/organizations/{organization}/settings/idpsync/field-values [get]
|
||||
func (api *API) organizationIDPSyncClaimFieldValues(rw http.ResponseWriter, r *http.Request) {
|
||||
org := httpmw.OrganizationParam(r)
|
||||
api.idpSyncClaimFieldValues(org.ID, rw, r)
|
||||
@@ -802,7 +802,7 @@ func (api *API) organizationIDPSyncClaimFieldValues(rw http.ResponseWriter, r *h
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Param claimField query string true "Claim Field" format(string)
|
||||
// @Success 200 {array} string
|
||||
// @Router /settings/idpsync/field-values [get]
|
||||
// @Router /api/v2/settings/idpsync/field-values [get]
|
||||
func (api *API) deploymentIDPSyncClaimFieldValues(rw http.ResponseWriter, r *http.Request) {
|
||||
// nil uuid implies all organizations
|
||||
api.idpSyncClaimFieldValues(uuid.Nil, rw, r)
|
||||
|
||||
@@ -62,7 +62,7 @@ var Keys = map[string]ed25519.PublicKey{"2022-08-12": ed25519.PublicKey(key20220
|
||||
// @Tags Enterprise
|
||||
// @Param request body codersdk.AddLicenseRequest true "Add license request"
|
||||
// @Success 201 {object} codersdk.License
|
||||
// @Router /licenses [post]
|
||||
// @Router /api/v2/licenses [post]
|
||||
func (api *API) postLicense(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -165,7 +165,7 @@ func (api *API) postLicense(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Produce json
|
||||
// @Tags Enterprise
|
||||
// @Success 201 {object} codersdk.Response
|
||||
// @Router /licenses/refresh-entitlements [post]
|
||||
// @Router /api/v2/licenses/refresh-entitlements [post]
|
||||
func (api *API) postRefreshEntitlements(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
@@ -231,7 +231,7 @@ func (api *API) refreshEntitlements(ctx context.Context) error {
|
||||
// @Produce json
|
||||
// @Tags Enterprise
|
||||
// @Success 200 {array} codersdk.License
|
||||
// @Router /licenses [get]
|
||||
// @Router /api/v2/licenses [get]
|
||||
func (api *API) licenses(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
licenses, err := api.Database.GetLicenses(ctx)
|
||||
@@ -273,7 +273,7 @@ func (api *API) licenses(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Tags Enterprise
|
||||
// @Param id path string true "License ID" format(number)
|
||||
// @Success 200
|
||||
// @Router /licenses/{id} [delete]
|
||||
// @Router /api/v2/licenses/{id} [delete]
|
||||
func (api *API) deleteLicense(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
// @Tags Enterprise
|
||||
// @Success 200 "Success"
|
||||
// @Success 304 "Not modified"
|
||||
// @Router /notifications/templates/{notification_template}/method [put]
|
||||
// @Router /api/v2/notifications/templates/{notification_template}/method [put]
|
||||
func (api *API) updateNotificationTemplateMethod(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
// @Param organization path string true "Organization ID or name"
|
||||
// @Param request body codersdk.UpdateOrganizationRequest true "Patch organization request"
|
||||
// @Success 200 {object} codersdk.Organization
|
||||
// @Router /organizations/{organization} [patch]
|
||||
// @Router /api/v2/organizations/{organization} [patch]
|
||||
func (api *API) patchOrganization(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -129,7 +129,7 @@ func (api *API) patchOrganization(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Tags Organizations
|
||||
// @Param organization path string true "Organization ID or name"
|
||||
// @Success 200 {object} codersdk.Response
|
||||
// @Router /organizations/{organization} [delete]
|
||||
// @Router /api/v2/organizations/{organization} [delete]
|
||||
func (api *API) deleteOrganization(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -216,7 +216,7 @@ func (api *API) deleteOrganization(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Tags Organizations
|
||||
// @Param request body codersdk.CreateOrganizationRequest true "Create organization request"
|
||||
// @Success 201 {object} codersdk.Organization
|
||||
// @Router /organizations [post]
|
||||
// @Router /api/v2/organizations [post]
|
||||
func (api *API) postOrganizations(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
// organizationID is required before the audit log entry is created.
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
// @Produce json
|
||||
// @Tags Prebuilds
|
||||
// @Success 200 {object} codersdk.PrebuildsSettings
|
||||
// @Router /prebuilds/settings [get]
|
||||
// @Router /api/v2/prebuilds/settings [get]
|
||||
func (api *API) prebuildsSettings(rw http.ResponseWriter, r *http.Request) {
|
||||
settingsJSON, err := api.Database.GetPrebuildsSettings(r.Context())
|
||||
if err != nil {
|
||||
@@ -55,7 +55,7 @@ func (api *API) prebuildsSettings(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Param request body codersdk.PrebuildsSettings true "Prebuilds settings request"
|
||||
// @Success 200 {object} codersdk.PrebuildsSettings
|
||||
// @Success 304
|
||||
// @Router /prebuilds/settings [put]
|
||||
// @Router /api/v2/prebuilds/settings [put]
|
||||
func (api *API) putPrebuildsSettings(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ func (p *provisionerDaemonAuth) authorize(r *http.Request, org database.Organiza
|
||||
// @Tags Enterprise
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Success 101
|
||||
// @Router /organizations/{organization}/provisionerdaemons/serve [get]
|
||||
// @Router /api/v2/organizations/{organization}/provisionerdaemons/serve [get]
|
||||
func (api *API) provisionerDaemonServe(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
// @Tags Enterprise
|
||||
// @Param organization path string true "Organization ID"
|
||||
// @Success 201 {object} codersdk.CreateProvisionerKeyResponse
|
||||
// @Router /organizations/{organization}/provisionerkeys [post]
|
||||
// @Router /api/v2/organizations/{organization}/provisionerkeys [post]
|
||||
func (api *API) postProvisionerKey(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
organization := httpmw.OrganizationParam(r)
|
||||
@@ -104,7 +104,7 @@ func (api *API) postProvisionerKey(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Tags Enterprise
|
||||
// @Param organization path string true "Organization ID"
|
||||
// @Success 200 {object} []codersdk.ProvisionerKey
|
||||
// @Router /organizations/{organization}/provisionerkeys [get]
|
||||
// @Router /api/v2/organizations/{organization}/provisionerkeys [get]
|
||||
func (api *API) provisionerKeys(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
organization := httpmw.OrganizationParam(r)
|
||||
@@ -125,7 +125,7 @@ func (api *API) provisionerKeys(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Tags Enterprise
|
||||
// @Param organization path string true "Organization ID"
|
||||
// @Success 200 {object} []codersdk.ProvisionerKeyDaemons
|
||||
// @Router /organizations/{organization}/provisionerkeys/daemons [get]
|
||||
// @Router /api/v2/organizations/{organization}/provisionerkeys/daemons [get]
|
||||
func (api *API) provisionerKeyDaemons(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
organization := httpmw.OrganizationParam(r)
|
||||
@@ -191,7 +191,7 @@ func (api *API) provisionerKeyDaemons(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Param organization path string true "Organization ID"
|
||||
// @Param provisionerkey path string true "Provisioner key name"
|
||||
// @Success 204
|
||||
// @Router /organizations/{organization}/provisionerkeys/{provisionerkey} [delete]
|
||||
// @Router /api/v2/organizations/{organization}/provisionerkeys/{provisionerkey} [delete]
|
||||
func (api *API) deleteProvisionerKey(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
provisionerKey := httpmw.ProvisionerKeyParam(r)
|
||||
@@ -221,7 +221,7 @@ func (api *API) deleteProvisionerKey(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Tags Enterprise
|
||||
// @Param provisionerkey path string true "Provisioner Key"
|
||||
// @Success 200 {object} codersdk.ProvisionerKey
|
||||
// @Router /provisionerkeys/{provisionerkey} [get]
|
||||
// @Router /api/v2/provisionerkeys/{provisionerkey} [get]
|
||||
func (*API) fetchProvisionerKey(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
// @Produce json
|
||||
// @Tags Enterprise
|
||||
// @Success 200 {array} codersdk.Replica
|
||||
// @Router /replicas [get]
|
||||
// @Router /api/v2/replicas [get]
|
||||
func (api *API) replicas(rw http.ResponseWriter, r *http.Request) {
|
||||
if !api.AGPL.Authorize(r, policy.ActionRead, rbac.ResourceReplicas) {
|
||||
httpapi.ResourceNotFound(rw)
|
||||
|
||||
@@ -30,7 +30,7 @@ import (
|
||||
// @Param request body codersdk.CustomRoleRequest true "Insert role request"
|
||||
// @Tags Members
|
||||
// @Success 200 {array} codersdk.Role
|
||||
// @Router /organizations/{organization}/members/roles [post]
|
||||
// @Router /api/v2/organizations/{organization}/members/roles [post]
|
||||
func (api *API) postOrgRoles(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -97,7 +97,7 @@ func (api *API) postOrgRoles(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Param request body codersdk.CustomRoleRequest true "Update role request"
|
||||
// @Tags Members
|
||||
// @Success 200 {array} codersdk.Role
|
||||
// @Router /organizations/{organization}/members/roles [put]
|
||||
// @Router /api/v2/organizations/{organization}/members/roles [put]
|
||||
func (api *API) putOrgRoles(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -187,7 +187,7 @@ func (api *API) putOrgRoles(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Param roleName path string true "Role name"
|
||||
// @Tags Members
|
||||
// @Success 200 {array} codersdk.Role
|
||||
// @Router /organizations/{organization}/members/roles/{roleName} [delete]
|
||||
// @Router /api/v2/organizations/{organization}/members/roles/{roleName} [delete]
|
||||
func (api *API) deleteOrgRole(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
|
||||
@@ -28,7 +28,7 @@ import (
|
||||
// @Tags Enterprise
|
||||
// @Param template path string true "Template ID" format(uuid)
|
||||
// @Success 200 {array} codersdk.ACLAvailable
|
||||
// @Router /templates/{template}/acl/available [get]
|
||||
// @Router /api/v2/templates/{template}/acl/available [get]
|
||||
func (api *API) templateAvailablePermissions(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -101,7 +101,7 @@ func (api *API) templateAvailablePermissions(rw http.ResponseWriter, r *http.Req
|
||||
// @Tags Enterprise
|
||||
// @Param template path string true "Template ID" format(uuid)
|
||||
// @Success 200 {object} codersdk.TemplateACL
|
||||
// @Router /templates/{template}/acl [get]
|
||||
// @Router /api/v2/templates/{template}/acl [get]
|
||||
func (api *API) templateACL(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -187,7 +187,7 @@ func (api *API) templateACL(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Param template path string true "Template ID" format(uuid)
|
||||
// @Param request body codersdk.UpdateTemplateACL true "Update template ACL request"
|
||||
// @Success 200 {object} codersdk.Response
|
||||
// @Router /templates/{template}/acl [patch]
|
||||
// @Router /api/v2/templates/{template}/acl [patch]
|
||||
func (api *API) patchTemplateACL(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -347,7 +347,7 @@ func (api *API) RequireFeatureMW(feat codersdk.FeatureName) func(http.Handler) h
|
||||
// @Tags Enterprise
|
||||
// @Param template path string true "Template ID" format(uuid)
|
||||
// @Success 200 {object} codersdk.InvalidatePresetsResponse
|
||||
// @Router /templates/{template}/prebuilds/invalidate [post]
|
||||
// @Router /api/v2/templates/{template}/prebuilds/invalidate [post]
|
||||
func (api *API) postInvalidateTemplatePresets(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
template := httpmw.TemplateParam(r)
|
||||
|
||||
@@ -43,7 +43,7 @@ func (api *API) autostopRequirementEnabledMW(next http.Handler) http.Handler {
|
||||
// @Tags Enterprise
|
||||
// @Param user path string true "User ID" format(uuid)
|
||||
// @Success 200 {array} codersdk.UserQuietHoursScheduleResponse
|
||||
// @Router /users/{user}/quiet-hours [get]
|
||||
// @Router /api/v2/users/{user}/quiet-hours [get]
|
||||
func (api *API) userQuietHoursSchedule(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -79,7 +79,7 @@ func (api *API) userQuietHoursSchedule(rw http.ResponseWriter, r *http.Request)
|
||||
// @Param user path string true "User ID" format(uuid)
|
||||
// @Param request body codersdk.UpdateUserQuietHoursScheduleRequest true "Update schedule request"
|
||||
// @Success 200 {array} codersdk.UserQuietHoursScheduleResponse
|
||||
// @Router /users/{user}/quiet-hours [put]
|
||||
// @Router /api/v2/users/{user}/quiet-hours [put]
|
||||
func (api *API) putUserQuietHoursSchedule(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
|
||||
@@ -31,7 +31,7 @@ func (api *API) shouldBlockNonBrowserConnections(rw http.ResponseWriter) bool {
|
||||
// @Param workspace path string true "Workspace ID" format(uuid)
|
||||
// @Param agent path string true "Agent name"
|
||||
// @Success 200 {object} codersdk.ExternalAgentCredentials
|
||||
// @Router /workspaces/{workspace}/external-agent/{agent}/credentials [get]
|
||||
// @Router /api/v2/workspaces/{workspace}/external-agent/{agent}/credentials [get]
|
||||
func (api *API) workspaceExternalAgentCredentials(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
workspace := httpmw.WorkspaceParam(r)
|
||||
|
||||
@@ -94,7 +94,7 @@ func (api *API) fetchRegions(ctx context.Context) (codersdk.RegionsResponse[code
|
||||
// @Param workspaceproxy path string true "Proxy ID or name" format(uuid)
|
||||
// @Param request body codersdk.PatchWorkspaceProxy true "Update workspace proxy request"
|
||||
// @Success 200 {object} codersdk.WorkspaceProxy
|
||||
// @Router /workspaceproxies/{workspaceproxy} [patch]
|
||||
// @Router /api/v2/workspaceproxies/{workspaceproxy} [patch]
|
||||
func (api *API) patchWorkspaceProxy(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -243,7 +243,7 @@ func (api *API) patchPrimaryWorkspaceProxy(req codersdk.PatchWorkspaceProxy, rw
|
||||
// @Tags Enterprise
|
||||
// @Param workspaceproxy path string true "Proxy ID or name" format(uuid)
|
||||
// @Success 200 {object} codersdk.Response
|
||||
// @Router /workspaceproxies/{workspaceproxy} [delete]
|
||||
// @Router /api/v2/workspaceproxies/{workspaceproxy} [delete]
|
||||
func (api *API) deleteWorkspaceProxy(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -295,7 +295,7 @@ func (api *API) deleteWorkspaceProxy(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Tags Enterprise
|
||||
// @Param workspaceproxy path string true "Proxy ID or name" format(uuid)
|
||||
// @Success 200 {object} codersdk.WorkspaceProxy
|
||||
// @Router /workspaceproxies/{workspaceproxy} [get]
|
||||
// @Router /api/v2/workspaceproxies/{workspaceproxy} [get]
|
||||
func (api *API) workspaceProxy(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -313,7 +313,7 @@ func (api *API) workspaceProxy(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Tags Enterprise
|
||||
// @Param request body codersdk.CreateWorkspaceProxyRequest true "Create workspace proxy request"
|
||||
// @Success 201 {object} codersdk.WorkspaceProxy
|
||||
// @Router /workspaceproxies [post]
|
||||
// @Router /api/v2/workspaceproxies [post]
|
||||
func (api *API) postWorkspaceProxy(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
@@ -417,7 +417,7 @@ func validateProxyURL(u string) error {
|
||||
// @Produce json
|
||||
// @Tags Enterprise
|
||||
// @Success 200 {array} codersdk.RegionsResponse[codersdk.WorkspaceProxy]
|
||||
// @Router /workspaceproxies [get]
|
||||
// @Router /api/v2/workspaceproxies [get]
|
||||
func (api *API) workspaceProxies(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
proxies, err := api.fetchWorkspaceProxies(r.Context())
|
||||
@@ -461,7 +461,7 @@ func (api *API) fetchWorkspaceProxies(ctx context.Context) (codersdk.RegionsResp
|
||||
// @Tags Enterprise
|
||||
// @Param request body workspaceapps.IssueTokenRequest true "Issue signed app token request"
|
||||
// @Success 201 {object} wsproxysdk.IssueSignedAppTokenResponse
|
||||
// @Router /workspaceproxies/me/issue-signed-app-token [post]
|
||||
// @Router /api/v2/workspaceproxies/me/issue-signed-app-token [post]
|
||||
// @x-apidocgen {"skip": true}
|
||||
func (api *API) workspaceProxyIssueSignedAppToken(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
@@ -513,7 +513,7 @@ func (api *API) workspaceProxyIssueSignedAppToken(rw http.ResponseWriter, r *htt
|
||||
// @Tags Enterprise
|
||||
// @Param request body wsproxysdk.ReportAppStatsRequest true "Report app stats request"
|
||||
// @Success 204
|
||||
// @Router /workspaceproxies/me/app-stats [post]
|
||||
// @Router /api/v2/workspaceproxies/me/app-stats [post]
|
||||
// @x-apidocgen {"skip": true}
|
||||
func (api *API) workspaceProxyReportAppStats(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
@@ -553,7 +553,7 @@ func (api *API) workspaceProxyReportAppStats(rw http.ResponseWriter, r *http.Req
|
||||
// @Tags Enterprise
|
||||
// @Param request body wsproxysdk.RegisterWorkspaceProxyRequest true "Register workspace proxy request"
|
||||
// @Success 201 {object} wsproxysdk.RegisterWorkspaceProxyResponse
|
||||
// @Router /workspaceproxies/me/register [post]
|
||||
// @Router /api/v2/workspaceproxies/me/register [post]
|
||||
// @x-apidocgen {"skip": true}
|
||||
func (api *API) workspaceProxyRegister(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
@@ -751,7 +751,7 @@ func (api *API) workspaceProxyRegister(rw http.ResponseWriter, r *http.Request)
|
||||
// @Tags Enterprise
|
||||
// @Param feature query string true "Feature key"
|
||||
// @Success 200 {object} wsproxysdk.CryptoKeysResponse
|
||||
// @Router /workspaceproxies/me/crypto-keys [get]
|
||||
// @Router /api/v2/workspaceproxies/me/crypto-keys [get]
|
||||
// @x-apidocgen {"skip": true}
|
||||
func (api *API) workspaceProxyCryptoKeys(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
@@ -789,7 +789,7 @@ func (api *API) workspaceProxyCryptoKeys(rw http.ResponseWriter, r *http.Request
|
||||
// @Tags Enterprise
|
||||
// @Param request body wsproxysdk.DeregisterWorkspaceProxyRequest true "Deregister workspace proxy request"
|
||||
// @Success 204
|
||||
// @Router /workspaceproxies/me/deregister [post]
|
||||
// @Router /api/v2/workspaceproxies/me/deregister [post]
|
||||
// @x-apidocgen {"skip": true}
|
||||
func (api *API) workspaceProxyDeregister(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
@@ -866,7 +866,7 @@ func (api *API) workspaceProxyDeregister(rw http.ResponseWriter, r *http.Request
|
||||
// @Produce json
|
||||
// @Param request body codersdk.IssueReconnectingPTYSignedTokenRequest true "Issue reconnecting PTY signed token request"
|
||||
// @Success 200 {object} codersdk.IssueReconnectingPTYSignedTokenResponse
|
||||
// @Router /applications/reconnecting-pty-signed-token [post]
|
||||
// @Router /api/v2/applications/reconnecting-pty-signed-token [post]
|
||||
// @x-apidocgen {"skip": true}
|
||||
func (api *API) reconnectingPTYSignedToken(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
// @Security CoderSessionToken
|
||||
// @Tags Enterprise
|
||||
// @Success 101
|
||||
// @Router /workspaceproxies/me/coordinate [get]
|
||||
// @Router /api/v2/workspaceproxies/me/coordinate [get]
|
||||
// @x-apidocgen {"skip": true}
|
||||
func (api *API) workspaceProxyCoordinate(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
@@ -127,7 +127,7 @@ func (c *committer) CommitQuota(
|
||||
// @Tags Enterprise
|
||||
// @Param user path string true "User ID, name, or me"
|
||||
// @Success 200 {object} codersdk.WorkspaceQuota
|
||||
// @Router /workspace-quota/{user} [get]
|
||||
// @Router /api/v2/workspace-quota/{user} [get]
|
||||
// @Deprecated this endpoint will be removed, use /organizations/{organization}/members/{user}/workspace-quota instead
|
||||
func (api *API) workspaceQuotaByUser(rw http.ResponseWriter, r *http.Request) {
|
||||
defaultOrg, err := api.Database.GetDefaultOrganization(r.Context())
|
||||
@@ -150,7 +150,7 @@ func (api *API) workspaceQuotaByUser(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Param user path string true "User ID, name, or me"
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Success 200 {object} codersdk.WorkspaceQuota
|
||||
// @Router /organizations/{organization}/members/{user}/workspace-quota [get]
|
||||
// @Router /api/v2/organizations/{organization}/members/{user}/workspace-quota [get]
|
||||
func (api *API) workspaceQuota(rw http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
organization = httpmw.OrganizationParam(r)
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
// @Tags Enterprise
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Success 200 {object} codersdk.WorkspaceSharingSettings
|
||||
// @Router /organizations/{organization}/settings/workspace-sharing [get]
|
||||
// @Router /api/v2/organizations/{organization}/settings/workspace-sharing [get]
|
||||
func (api *API) workspaceSharingSettings(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
org := httpmw.OrganizationParam(r)
|
||||
@@ -59,7 +59,7 @@ func (api *API) workspaceSharingSettings(rw http.ResponseWriter, r *http.Request
|
||||
// @Param organization path string true "Organization ID" format(uuid)
|
||||
// @Param request body codersdk.UpdateWorkspaceSharingSettingsRequest true "Workspace sharing settings"
|
||||
// @Success 200 {object} codersdk.WorkspaceSharingSettings
|
||||
// @Router /organizations/{organization}/settings/workspace-sharing [patch]
|
||||
// @Router /api/v2/organizations/{organization}/settings/workspace-sharing [patch]
|
||||
func (api *API) patchWorkspaceSharingSettings(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
org := httpmw.OrganizationParam(r)
|
||||
|
||||
Reference in New Issue
Block a user