Workspace by ID

https://api.xata.io/workspaces/workspace_id

This endpoint contains operations for a specific workspace, referenced by ID.

Expected parameters

NameDescriptionInRequiredSchema
workspace_id

Workspace ID

pathstring

Get an Existing Workspace

GET
https://api.xata.io/workspaces/workspace_id

Retrieve workspace info from a workspace ID

Responses

type GetWorkspace = WorkspaceMeta & {
    id: WorkspaceID;
    memberCount: number;
    plan: "free" | "pro";
};
 
type WorkspaceMeta = {
    name: string;
    slug?: string;
};
 
/**
 * @pattern ^([a-zA-Z0-9][a-zA-Z0-9_\-~]+-)?[a-zA-Z0-9]{6}
 */
type WorkspaceID = string;

Update an Existing Workspace

PUT
https://api.xata.io/workspaces/workspace_id

Update workspace info

Request Body Type Definition

type UpdateWorkspace = WorkspaceMeta;
 
type WorkspaceMeta = {
    name: string;
    slug?: string;
};

Responses

type UpdateWorkspace = WorkspaceMeta & {
    id: WorkspaceID;
    memberCount: number;
    plan: "free" | "pro";
};
 
type WorkspaceMeta = {
    name: string;
    slug?: string;
};
 
/**
 * @pattern ^([a-zA-Z0-9][a-zA-Z0-9_\-~]+-)?[a-zA-Z0-9]{6}
 */
type WorkspaceID = string;

Delete an Existing Workspace

DELETE
https://api.xata.io/workspaces/workspace_id

Delete the workspace with the provided ID

Responses

type DeleteWorkspace = void;