Workspace by ID
https://api.xata.io/workspaces/workspace_idThis 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_idRetrieve workspace info from a workspace ID
Responses
type GetWorkspace = 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 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_idUpdate workspace info
Request Body Type Definition
type UpdateWorkspace = WorkspaceMeta;
type WorkspaceMeta = {
name: string;
slug?: string;
};Responses
type UpdateWorkspace = 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 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_idDelete 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;