Skip to main content

getTreeBatch

client.projects.getTreeBatch(data: BatchTreeItemsRequest): Promise<TreeItem[]>

Retrieves multiple tree items in a single batch request.

Fetches details for several tree items at once, reducing round trips compared to individual calls. Useful when loading multiple files or directories.

Parameters​

ParameterTypeRequiredDescription
dataBatchTreeItemsRequestYesThe batch request containing the item IDs to fetch

Returns​

Promise<TreeItem[]> — A promise that resolves to an array of tree items

Example​

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

const client = new CodeBoltClient();

const result = await client.projects.getTreeBatch(/* BatchTreeItemsRequest */);
console.log(result);