Workspace by ID
https://api.xata.io/workspaces/workspace_id
This endpoint contains operations for a specific workspace, referenced by ID.
Expected parameters
Name | Description | In | Required | Schema |
---|---|---|---|---|
workspace_id | Workspace ID | path | ✅ | string |
Get an Existing Workspace
GEThttps://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;
type GetWorkspace = {
id?: string;
message: string;
};
{
"message": "invalid API key"
}
{
"message": "invalid API key"
}
type GetWorkspace = {
id?: string;
message: string;
};
type GetWorkspace = void;
Update an Existing Workspace
PUThttps://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;
type UpdateWorkspace = {
id?: string;
message: string;
};
{
"message": "invalid API key"
}
{
"message": "invalid API key"
}
type UpdateWorkspace = {
id?: string;
message: string;
};
type UpdateWorkspace = void;
Delete an Existing Workspace
DELETEhttps://api.xata.io/workspaces/workspace_id
Delete the workspace with the provided ID
Responses
type DeleteWorkspace = void;
type DeleteWorkspace = {
id?: string;
message: string;
};
{
"message": "invalid API key"
}
{
"message": "invalid API key"
}
type DeleteWorkspace = {
id?: string;
message: string;
};
type DeleteWorkspace = void;