githubEdit

delete__workspace_{workspaceId}

DELETE /workspace/{id}

Delete Workspace

Delete a workspace (soft delete). The user must have ADMIN access to the workspace to perform deletion. Workspaces with existing buckets or repositories cannot be deleted.

TypeScript Client Library

public deleteWorkspace = async (id: string): Promise<WorkspaceTypes.DeleteWorkspaceResponse> => {
  return this.makeRequest<WorkspaceTypes.DeleteWorkspaceResponse>(`workspace/${id}`, 'DELETE', null);
};

Code Samples

# You can also use wget
curl -X DELETE https://backend.flashback.tech/workspace/123e4567-e89b-12d3-a456-426614174000 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name
In
Type
Required
Description

id

path

string

true

The unique identifier of the workspace

Path Parameters

Name
Type
Required
Restrictions
Description

id

string

true

none

The unique identifier of the workspace

Example responses

200 Response

400 Response

400 Response

403 Response

404 Response

500 Response

Responses

Status
Meaning
Description
Schema

200

Workspace deleted successfully

Inline

400

User not found, not validated, or workspace has resources

Inline

403

Insufficient permissions

Inline

404

Workspace not found

Inline

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

» success

boolean

true

none

Operation success status

Status Code 400

Name
Type
Required
Restrictions
Description

» success

boolean

true

none

Operation success status

» message

string

true

none

Error message

Status Code 403

Name
Type
Required
Restrictions
Description

» success

boolean

true

none

Operation success status

» message

string

true

none

Error message

Status Code 404

Name
Type
Required
Restrictions
Description

» success

boolean

true

none

Operation success status

» message

string

true

none

Error message

Status Code 500

Name
Type
Required
Restrictions
Description

» success

boolean

true

none

Operation success status

» message

string

true

none

Error message

Notes

  • Authentication Required: User must be authenticated with a valid Bearer token

  • Permissions: User must have ADMIN access to the workspace to perform deletion

  • Account Validation: User account must be validated to delete workspaces

  • Resource Check: Workspaces with existing buckets or repositories cannot be deleted

  • Soft Delete: The workspace is marked as deleted but not permanently removed from the database

  • User Cleanup: All workspace users are removed when the workspace is deleted

  • Organization Scoped: Workspaces are scoped to the user's organization

  • Reversible: Soft deletion allows for potential recovery if needed

Last updated

Was this helpful?