Workspaces
https://api.xata.io/workspacesThis endpoint enables interacting with specific workspaces within Xata. For more information about workspaces, see the docs.
Get List of Workspaces
GEThttps://api.xata.io/workspacesRetrieve the list of workspaces the user belongs to
Responses
type GetWorkspacesList = {
workspaces: {
id: WorkspaceID;
name: string;
slug: string;
role: Role;
plan: WorkspacePlan;
}[];
};
/**
* @pattern ^([a-zA-Z0-9][a-zA-Z0-9_\-~]+-)?[a-zA-Z0-9]{6}
*/
type WorkspaceID = string;
type Role = "owner" | "maintainer";
type WorkspacePlan = "free" | "pro";type GetWorkspacesList = {
id?: string;
message: string;
};{
"message": "invalid API key"
}type GetWorkspacesList = {
id?: string;
message: string;
};type GetWorkspacesList = void;Create a New Workspace
POSThttps://api.xata.io/workspacesCreates a new workspace with the user requesting it as its single owner.
Request Body Type Definition
type CreateWorkspace = WorkspaceMeta;
type WorkspaceMeta = {
name: string;
slug?: string;
};Responses
type CreateWorkspace = WorkspaceMeta & {
id: WorkspaceID;
memberCount: number;
plan: WorkspacePlan;
};
type WorkspaceMeta = {
name: string;
slug?: string;
};
/**
* @pattern ^([a-zA-Z0-9][a-zA-Z0-9_\-~]+-)?[a-zA-Z0-9]{6}
*/
type WorkspaceID = string;
type WorkspacePlan = "free" | "pro";type CreateWorkspace = {
id?: string;
message: string;
};{
"message": "invalid API key"
}type CreateWorkspace = {
id?: string;
message: string;
};type CreateWorkspace = void;