Get component tree for a specific project
Returns the complete hierarchical tree structure of components and their items for a specific project. Only non-deleted components and items are included in the response.
Component Tree Structure: The project tree organizes work into a clear hierarchy:
- Components: Top-level containers that group related work packages. Examples include “Website Development”, “CRM Onboarding”, or “E-commerce Setup”. Each component represents a major deliverable or project phase.
- Items: Building blocks within components. Each item can be one of four types:
- Epic: Major sections or phases that group related work packages around a common theme (e.g., “Technical Implementation”, “Design & Development”)
- Work Package: Self-contained, clearly defined tasks that deliver tangible results (e.g., “Set up hosting”, “Design homepage layout”). Work packages can have timeframes, questions, todos, and test cases.
- Todo List: Checklists of sub-steps or checkpoints perfect for recurring processes, quality control, or project preparation (e.g., “Kickoff Checklist”, “Quality Control”)
- Test Suite: Formal acceptance tests for project results. Contains multiple test cases with steps and expected results (e.g., “Contact Form Tests”, “SEO Review”)
Nesting and Relationships: Items can be nested to any depth, allowing for complex project structures. Each Work Package can contain Questions (to capture customer requirements), Todos (checklist items that can be checked off), and Test Cases (individual test steps within a Test Suite).
Use Cases: This endpoint is ideal for displaying the complete project structure in a tree view, understanding project organization, and navigating the component hierarchy.
GET
/projects/{projectId}/components/treeAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:reador
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstringrequiredResponses
200Project component tree retrieved successfully
componentsComponentTreeComponentDto[]requiredList of components in the library
Show propertiesHide properties
Array of
ComponentTreeComponentDtoiconobject | nullrequiredIcon identifier for the component (nullable). Format: :icon_name: (e.g., :rocket:, :box:, :star:)
idstringrequiredUnique identifier for the component
namestringrequiredName of the component
totalTimeFramenumberrequiredTotal time frame for the component
itemsComponentTreeItemDto[]requiredList of items (Epics, Work Packages, Todo Lists, Test Suites) in the library. Items are the building blocks within components and can be nested to any depth.
Show propertiesHide properties
Array of
ComponentTreeItemDtocomponentIdstringrequiredID of the parent component
conditionsValidbooleanrequiredWhether all conditions are valid for this item
failedConditionsIdsstring[]requiredArray of failed condition IDs
iconobject | nullrequiredIcon identifier for the component item (nullable). Format: :icon_name: (e.g., :rocket:, :check:, :star:)
idstringrequiredUnique identifier for the component item
namestringrequiredName of the component item
parentIdobject | nullrequiredID of the parent item (nullable for top-level items)
totalEstimatenumberrequiredTotal time estimate for the item
typestringrequiredType of the component item. Items are the building blocks within components:
- **Epic**: Groups related work packages around a common theme
- **WorkPackage**: Self-contained task that delivers a tangible result
- **TodoList**: Checklist of sub-steps or checkpoints
- **TestSuite**: Formal acceptance tests with test cases
Allowed:
EpicWorkPackageTodoListTestSuite400Invalid project ID format
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X GET "https://leadtime.app/api/public/projects/string/components/tree" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/projects/string/components/tree", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.get(
"https://leadtime.app/api/public/projects/string/components/tree",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"components": [
{
"icon": ":box:",
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "User Authentication Module",
"totalTimeFrame": 40
}
],
"items": [
{
"componentId": "550e8400-e29b-41d4-a716-446655440000",
"conditionsValid": true,
"failedConditionsIds": [],
"icon": ":check:",
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Login Feature",
"parentId": null,
"totalEstimate": 20,
"type": "Epic"
}
]
}Invalid project ID format
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions