Skip to main content

getHierarchy

plugin.tasksApi.getHierarchy(taskId: string): Promise<TaskHierarchy>

Retrieves the complete hierarchy for a task.

Returns a hierarchical tree representation starting from the specified task, including all descendants and their relationships. This provides a complete view of the task's entire subtree for visualization or comprehensive analysis.

Parameters

ParameterTypeRequiredDescription
taskIdstringYesThe unique identifier of the root task

Returns

Promise<TaskHierarchy> — A promise that resolves to a TaskHierarchy object containing the full tree structure

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.tasksApi.getHierarchy('taskId');
console.log(result);