Skip to main content

getByWorkspace

client.projects.getByWorkspace(workspaceId: string): Promise<Project[]>

Retrieves all projects belonging to a specific workspace.

Returns the list of projects within the specified workspace, useful for workspace navigation and project switching.

Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesThe unique identifier of the workspace

Returns

Promise<Project[]> — A promise that resolves to an array of projects in the workspace

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.projects.getByWorkspace('workspaceId');
console.log(result);