Workspaces
https://api.xata.io/workspaces
This endpoint enables interacting with specific workspaces within Xata. For more information about workspaces, see the docs.
Get List of Workspaces
GEThttps://api.xata.io/workspaces
Retrieve the list of workspaces the user belongs to
Responses
type GetWorkspacesList = {
workspaces: {
id: WorkspaceID;
name: string;
slug: string;
role: Role;
}[];
};
/**
* @pattern ^([a-zA-Z0-9][a-zA-Z0-9_\-~]+-)?[a-zA-Z0-9]{6}
*/
type WorkspaceID = string;
type Role = "owner" | "maintainer";
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/workspaces
Creates 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: "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;
type CreateWorkspace = {
id?: string;
message: string;
};
{
"message": "invalid API key"
}
type CreateWorkspace = {
id?: string;
message: string;
};
type CreateWorkspace = void;