# WorkspaceService | windmill-client
Documentation for windmill-client

# Class WorkspaceService

- Defined in src/services.gen.ts:769

#####
Index

### Constructors

constructor

### Methods

addUser
archiveWorkspace
changeWorkspaceId
changeWorkspaceName
createWorkspace
deleteInvite
deleteWorkspace
editAutoInvite
editCopilotConfig
editDefaultScripts
editDeployTo
editErrorHandler
editLargeFileStorageConfig
editSlackCommand
editWebhook
editWorkspaceDefaultApp
editWorkspaceGitSyncConfig
existsUsername
existsWorkspace
getCopilotInfo
getDefaultScripts
getDeployTo
getIsPremium
getLargeFileStorageConfig
getPremiumInfo
getSettings
getWorkspaceDefaultApp
getWorkspaceEncryptionKey
getWorkspaceName
getWorkspaceUsage
inviteUser
isDomainAllowed
leaveWorkspace
listPendingInvites
listUserWorkspaces
listWorkspaces
listWorkspacesAsSuperAdmin
runSlackMessageTestJob
setAutomaticBilling
setEnvironmentVariable
setWorkspaceEncryptionKey
unarchiveWorkspace

##
Constructors

### constructor

- new WorkspaceService(): WorkspaceService

- #### Returns WorkspaceService

##
Methods

### `Static` addUser

- addUser(data): CancelablePromise <string>

- add user to workspace

  #### Parameters

  - data: AddUserData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:901

### `Static` archiveWorkspace

- archiveWorkspace(data): CancelablePromise <string>

- archive workspace

  #### Parameters

  - data: ArchiveWorkspaceData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:940

### `Static` changeWorkspaceId

- changeWorkspaceId(data): CancelablePromise <string>

- change workspace id

  #### Parameters

  - data: ChangeWorkspaceIdData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1046

### `Static` changeWorkspaceName

- changeWorkspaceName(data): CancelablePromise <string>

- change workspace name

  #### Parameters

  - data: ChangeWorkspaceNameData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1026

### `Static` createWorkspace

- createWorkspace(data): CancelablePromise <string>

- create workspace

  #### Parameters

  - data: CreateWorkspaceData

    The data for the request.

  #### Returns CancelablePromise <string>

  string token created

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:832

### `Static` deleteInvite

- deleteInvite(data): CancelablePromise <string>

- delete user invite

  #### Parameters

  - data: DeleteInviteData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:921

### `Static` deleteWorkspace

- deleteWorkspace(data): CancelablePromise <string>

- delete workspace (require super admin)

  #### Parameters

  - data: DeleteWorkspaceData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:974

### `Static` editAutoInvite

- editAutoInvite(data): CancelablePromise <string>

- edit auto invite

  #### Parameters

  - data: EditAutoInviteData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1231

### `Static` editCopilotConfig

- editCopilotConfig(data): CancelablePromise <string>

- edit copilot config

  #### Parameters

  - data: EditCopilotConfigData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1271

### `Static` editDefaultScripts

- editDefaultScripts(data): CancelablePromise <string>

- edit default scripts for workspace

  #### Parameters

  - data: EditDefaultScriptsData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1388

### `Static` editDeployTo

- editDeployTo(data): CancelablePromise <string>

- edit deploy to

  #### Parameters

  - data: EditDeployToData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1211

### `Static` editErrorHandler

- editErrorHandler(data): CancelablePromise <string>

- edit error handler

  #### Parameters

  - data: EditErrorHandlerData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1308

### `Static` editLargeFileStorageConfig

- editLargeFileStorageConfig(data): CancelablePromise <unknown>

- edit large file storage settings

  #### Parameters

  - data: EditLargeFileStorageConfigData

    The data for the request.

  #### Returns CancelablePromise <unknown>

  unknown status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1328

### `Static` editSlackCommand

- editSlackCommand(data): CancelablePromise <string>

- edit slack command

  #### Parameters

  - data: EditSlackCommandData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1171

### `Static` editWebhook

- editWebhook(data): CancelablePromise <string>

- edit webhook

  #### Parameters

  - data: EditWebhookData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1251

### `Static` editWorkspaceDefaultApp

- editWorkspaceDefaultApp(data): CancelablePromise <string>

- edit default app for workspace

  #### Parameters

  - data: EditWorkspaceDefaultAppData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1368

### `Static` editWorkspaceGitSyncConfig

- editWorkspaceGitSyncConfig(data): CancelablePromise <unknown>

- edit workspace git sync settings

  #### Parameters

  - data: EditWorkspaceGitSyncConfigData

    The data for the request.

  #### Returns CancelablePromise <unknown>

  unknown status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1348

### `Static` existsUsername

- existsUsername(data): CancelablePromise <boolean>

- exists username

  #### Parameters

  - data: ExistsUsernameData

    The data for the request.

  #### Returns CancelablePromise <boolean>

  boolean status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:864

### `Static` existsWorkspace

- existsWorkspace(data): CancelablePromise <boolean>

- exists workspace

  #### Parameters

  - data: ExistsWorkspaceData

    The data for the request.

  #### Returns CancelablePromise <boolean>

  boolean status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:848

### `Static` getCopilotInfo

- getCopilotInfo(data): CancelablePromise < GetCopilotInfoResponse >

- get copilot info

  #### Parameters

  - data: GetCopilotInfoData

    The data for the request.

  #### Returns CancelablePromise < GetCopilotInfoResponse >

  unknown status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1290

### `Static` getDefaultScripts

- getDefaultScripts(data): CancelablePromise < WorkspaceDefaultScripts >

- get default scripts for workspace

  #### Parameters

  - data: GetDefaultScriptsData

    The data for the request.

  #### Returns CancelablePromise < WorkspaceDefaultScripts >

  WorkspaceDefaultScripts status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1407

### `Static` getDeployTo

- getDeployTo(data): CancelablePromise < GetDeployToResponse >

- get deploy to

  #### Parameters

  - data: GetDeployToData

    The data for the request.

  #### Returns CancelablePromise < GetDeployToResponse >

  unknown status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1099

### `Static` getIsPremium

- getIsPremium(data): CancelablePromise <boolean>

- get if workspace is premium

  #### Parameters

  - data: GetIsPremiumData

    The data for the request.

  #### Returns CancelablePromise <boolean>

  boolean status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1116

### `Static` getLargeFileStorageConfig

- getLargeFileStorageConfig(data): CancelablePromise < LargeFileStorage >

- get large file storage config

  #### Parameters

  - data: GetLargeFileStorageConfigData

    The data for the request.

  #### Returns CancelablePromise < LargeFileStorage >

  LargeFileStorage status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1498

### `Static` getPremiumInfo

- getPremiumInfo(data): CancelablePromise < GetPremiumInfoResponse >

- get premium info

  #### Parameters

  - data: GetPremiumInfoData

    The data for the request.

  #### Returns CancelablePromise < GetPremiumInfoResponse >

  unknown status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1133

### `Static` getSettings

- getSettings(data): CancelablePromise < GetSettingsResponse >

- get settings

  #### Parameters

  - data: GetSettingsData

    The data for the request.

  #### Returns CancelablePromise < GetSettingsResponse >

  unknown status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1082

### `Static` getWorkspaceDefaultApp

- getWorkspaceDefaultApp(data): CancelablePromise < GetWorkspaceDefaultAppResponse >

- get default app for workspace

  #### Parameters

  - data: GetWorkspaceDefaultAppData

    The data for the request.

  #### Returns CancelablePromise < GetWorkspaceDefaultAppResponse >

  unknown status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1481

### `Static` getWorkspaceEncryptionKey

- getWorkspaceEncryptionKey(data): CancelablePromise < GetWorkspaceEncryptionKeyResponse >

- retrieves the encryption key for this workspace

  #### Parameters

  - data: GetWorkspaceEncryptionKeyData

    The data for the request.

  #### Returns CancelablePromise < GetWorkspaceEncryptionKeyResponse >

  unknown status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1444

### `Static` getWorkspaceName

- getWorkspaceName(data): CancelablePromise <string>

- get workspace name

  #### Parameters

  - data: GetWorkspaceNameData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1008

### `Static` getWorkspaceUsage

- getWorkspaceUsage(data): CancelablePromise <number>

- get usage

  #### Parameters

  - data: GetWorkspaceUsageData

    The data for the request.

  #### Returns CancelablePromise <number>

  number usage

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1515

### `Static` inviteUser

- inviteUser(data): CancelablePromise <string>

- invite user to workspace

  #### Parameters

  - data: InviteUserData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:881

### `Static` isDomainAllowed

- isDomainAllowed(): CancelablePromise <boolean>

- is domain allowed for auto invi

  #### Returns CancelablePromise <boolean>

  boolean domain allowed or not

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:787

### `Static` leaveWorkspace

- leaveWorkspace(data): CancelablePromise <string>

- leave workspace

  #### Parameters

  - data: LeaveWorkspaceData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:991

### `Static` listPendingInvites

- listPendingInvites(data): CancelablePromise < ListPendingInvitesResponse >

- list pending invites for a workspace

  #### Parameters

  - data: ListPendingInvitesData

    The data for the request.

  #### Returns CancelablePromise < ListPendingInvitesResponse >

  WorkspaceInvite user

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1065

### `Static` listUserWorkspaces

- listUserWorkspaces(): CancelablePromise < UserWorkspaceList >

- list all workspaces visible to me with user info

  #### Returns CancelablePromise < UserWorkspaceList >

  UserWorkspaceList workspace with associated username

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:799

### `Static` listWorkspaces

- listWorkspaces(): CancelablePromise < ListWorkspacesResponse >

- list all workspaces visible to me

  #### Returns CancelablePromise < ListWorkspacesResponse >

  Workspace all workspaces

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:775

### `Static` listWorkspacesAsSuperAdmin

- listWorkspacesAsSuperAdmin(data?): CancelablePromise < ListWorkspacesAsSuperAdminResponse >

- list all workspaces as super admin (require to be super admin)

  #### Parameters

  - data: ListWorkspacesAsSuperAdminData = {}

    The data for the request.

  #### Returns CancelablePromise < ListWorkspacesAsSuperAdminResponse >

  Workspace workspaces

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:814

### `Static` runSlackMessageTestJob

- runSlackMessageTestJob(data): CancelablePromise < RunSlackMessageTestJobResponse >

- run a job that sends a message to Slack

  #### Parameters

  - data: RunSlackMessageTestJobData

    The data for the request.

  #### Returns CancelablePromise < RunSlackMessageTestJobResponse >

  unknown status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1191

### `Static` setAutomaticBilling

- setAutomaticBilling(data): CancelablePromise <string>

- set automatic billing

  #### Parameters

  - data: SetAutomaticBillingData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1151

### `Static` setEnvironmentVariable

- setEnvironmentVariable(data): CancelablePromise <string>

- set environment variable

  #### Parameters

  - data: SetEnvironmentVariableData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1425

### `Static` setWorkspaceEncryptionKey

- setWorkspaceEncryptionKey(data): CancelablePromise <string>

- update the encryption key for this workspace

  #### Parameters

  - data: SetWorkspaceEncryptionKeyData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:1462

### `Static` unarchiveWorkspace

- unarchiveWorkspace(data): CancelablePromise <string>

- unarchive workspace

  #### Parameters

  - data: UnarchiveWorkspaceData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:957