Get project component item details
Returns complete details of a component item from a project component tree including all test cases, todos, questions, conditions, and nested children.
What are Component Items? Items are the building blocks within components that structure the project work. 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”). Epics help track project progress at a strategic level.
- Work Package: Self-contained, clearly defined tasks that deliver tangible results (e.g., “Set up hosting”, “Design homepage”). Work packages can have timeframes, questions, todos, and test cases attached.
- Todo List: Checklists of sub-steps or checkpoints perfect for recurring processes, quality control, or project preparation (e.g., “Kickoff Checklist”, “Quality Control”). Each todo item can be checked off individually.
- Test Suite: Formal acceptance tests for project results (e.g., “Contact Form Tests”, “SEO Review”). Contains multiple test cases with steps and expected results. The project is considered finished when all test cases pass.
Attached Resources: Each item can have various resources attached:
- Questions: Capture customer-specific requirements or project details in a structured way (e.g., “Do you need e-commerce functionality?”). Answers can automatically affect effort calculation and pricing.
- Todos: Checklist items within a Work Package or Todo List. Each todo can be checked off individually, supports comments, and tracks completion status with timestamps.
- Test Cases: Individual test steps within a Test Suite. Each test case has steps, expected results, and can be evaluated as Passed, Failed, or PassedWithReservations.
- Conditions: Rules that control when items are visible or active based on answers, todo completion, or test case status.
Response Format: All ProseMirror editor content (description, internalNote, question descriptions, test case steps, etc.) is automatically converted to HTML format. The response includes the complete item structure with all nested children, making it easy to display the full item hierarchy.
Access Control: Only project component items that belong to components in the specified project (component.projectId equals projectId) are accessible through this endpoint.
/projects/{projectId}/components/item-details/{id}AuthorizationOAuth2 access token · headerrequiredapi:readAuthorizationBearer token (JWT) · headerrequiredprojectIdstringrequiredidstringrequiredchildrenComponentChildrenShortItemDto[]requiredShow propertiesHide properties
ComponentChildrenShortItemDtochildrenComponentChildrenShortItemDto[]requiredShow propertiesHide properties
ComponentChildrenShortItemDtoComponentChildrenShortItemDto.conditionsValidbooleanrequiredentityUniqueIdstringrequirediconobject | nullrequiredidstringrequirednamestringrequiredquestionsCountnumberrequiredtaskIdobject | nullrequiredtaskShortNumberobject | nullrequiredtestCasesCountnumberrequiredtodosCountnumberrequiredtypestringrequiredEpicWorkPackageTodoListTestSuitecomponentIdstringrequiredconditionsComponentItemConditionDto[]requiredShow propertiesHide properties
ComponentItemConditionDtocontainsTypestringrequiredSomeAllidstring | nulltargetQuestionIdstring | nulltargetTestCaseIdstring | nulltargetTodoIdstring | nulltargetValuestring | nulltypestringrequiredQuestionAnsweredQuestionNotAnsweredQuestionAnswerContainsQuestionAnswerDoesNotContainQuestionAnswerEqualQuestionAnswerDoesNotEqualTodoIsDoneTodoIsNotDoneTestCasePassedTestCaseFailedconditionsValidbooleanrequireddescriptionstringrequiredentityUniqueIdstringrequiredfailedConditionsIdsstring[]requirediconobject | nullrequiredidstringrequiredincludeInSpecificationbooleanrequiredinternalNotestringrequirednamestringrequiredparentIdobject | nullrequiredquestionsComponentQuestionDto[]requiredShow propertiesHide properties
ComponentQuestionDtoansweredAtstring | nullansweredBystring | nulldescriptionstringrequirededitorAnswerstring | nullidstringrequiredisAnsweredbooleanrequiredoptionsComponentQuestionOptionDto[]requiredShow propertiesHide properties
ComponentQuestionOptionDtoextraHoursnumber | nullidstringrequiredisSelectedboolean | nulltitlestringrequiredquestionstringrequiredtitlestringrequiredtypestringrequiredShortTextEditorCheckboxRadioFilesDatepickerMultiplierPersontagsstring[]requiredtaskIdobject | nullrequiredtaskShortNumberobject | nullrequiredtestCasesComponentTestCaseDto[]requiredShow propertiesHide properties
ComponentTestCaseDtodescriptionstringrequiredexpectedResultstringrequiredidstringrequiredstepsstringrequiredtestCommentstring | nulltestStatusstring | nullPassedPassedWithReservationsFailedtestedAtstring | nulltestedBystring | nulltitlestringrequiredtimeFramenumberrequiredtodoItemsComponentTodoItemDto[]requiredShow propertiesHide properties
ComponentTodoItemDtodescriptionstringrequireddoneByobject | nullrequireddoneUpdatedAtobject | nullrequiredidstringrequiredisDonebooleanrequiredtitlestringrequiredtodoCommentobject | nullrequiredtypestringrequiredEpicWorkPackageTodoListTestSuitecurl -X GET "https://leadtime.app/api/public/projects/550e8400-e29b-41d4-a716-446655440000/components/item-details/3047983b-d798-4aff-8dd4-628cf1900703" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/projects/550e8400-e29b-41d4-a716-446655440000/components/item-details/3047983b-d798-4aff-8dd4-628cf1900703", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.get(
"https://leadtime.app/api/public/projects/550e8400-e29b-41d4-a716-446655440000/components/item-details/3047983b-d798-4aff-8dd4-628cf1900703",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
){
"children": [
{
"children": [
null
],
"conditionsValid": true,
"entityUniqueId": "unique-id-123",
"icon": ":check:",
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Login Feature",
"questionsCount": 2,
"taskId": "550e8400-e29b-41d4-a716-446655440002",
"taskShortNumber": 123,
"testCasesCount": 3,
"todosCount": 5,
"type": "Epic"
}
],
"componentId": "550e8400-e29b-41d4-a716-446655440000",
"conditions": [
{
"containsType": "Some",
"id": "550e8400-e29b-41d4-a716-446655440013",
"targetQuestionId": "550e8400-e29b-41d4-a716-446655440014",
"targetTestCaseId": "550e8400-e29b-41d4-a716-446655440016",
"targetTodoId": "550e8400-e29b-41d4-a716-446655440015",
"targetValue": "option-value",
"type": "QuestionAnswered"
}
],
"conditionsValid": true,
"description": "<p>Feature for user authentication.</p>",
"entityUniqueId": "unique-id-123",
"failedConditionsIds": [],
"icon": ":check:",
"id": "550e8400-e29b-41d4-a716-446655440001",
"includeInSpecification": true,
"internalNote": "<p>Implementation notes.</p>",
"name": "Login Feature",
"parentId": null,
"questions": [
{
"answeredAt": "2024-01-01T00:00:00.000Z",
"answeredBy": "550e8400-e29b-41d4-a716-446655440020",
"description": "<p>Select all security features that apply.</p>",
"editorAnswer": "<p>Two-factor authentication is required.</p>",
"id": "550e8400-e29b-41d4-a716-446655440017",
"isAnswered": true,
"options": [
{
"extraHours": 8,
"id": "550e8400-e29b-41d4-a716-446655440012",
"isSelected": true,
"title": "Two-factor authentication"
}
],
"question": "Which security features should be implemented?",
"title": "Security Features",
"type": "Checkbox"
}
],
"tags": [
"authentication",
"login"
],
"taskId": "550e8400-e29b-41d4-a716-446655440002",
"taskShortNumber": 123,
"testCases": [
{
"description": "<p>Verify that users can log in with valid credentials.</p>",
"expectedResult": "<p>User is successfully logged in and redirected to dashboard.</p>",
"id": "550e8400-e29b-41d4-a716-446655440010",
"steps": "<ol><li>Navigate to login page</li><li>Enter credentials</li><li>Click login button</li></ol>",
"testComment": "<p>Test passed successfully.</p>",
"testStatus": "Passed",
"testedAt": "2024-01-01T00:00:00.000Z",
"testedBy": "550e8400-e29b-41d4-a716-446655440020",
"title": "Test login with valid credentials"
}
],
"timeFrame": 40,
"todoItems": [
{
"description": "<p>Add password reset functionality to the authentication module.</p>",
"doneBy": "550e8400-e29b-41d4-a716-446655440020",
"doneUpdatedAt": "2024-01-01T00:00:00.000Z",
"id": "550e8400-e29b-41d4-a716-446655440011",
"isDone": false,
"title": "Implement password reset",
"todoComment": "<p>Completed ahead of schedule.</p>"
}
],
"type": "Epic"
}