Disconnect a component item from its associated task(s)
Disconnect a component item from its associated task(s). Optionally, the associated task(s) can be deleted after disconnection by setting deleteTask to true. All tasks connected to the item via entityUniqueId will be disconnected. If no tasks are connected to the item, a 404 error will be returned.
POST
/projects/{projectId}/items/{itemId}/tasks/disconnectAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstringrequireditemIdstringrequiredRequest body
requiredapplication/jsondeleteTaskbooleanrequiredWhether to delete the associated task(s) after disconnecting
Responses
200Item successfully disconnected from task(s)
successboolean400Invalid request: invalid projectId or itemId format, or validation error in request body
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions to manage components or access to project denied
404Project not found, item not found, item does not belong to the project, or no tasks are connected to the item
Request
curl -X POST "https://leadtime.app/api/public/projects/string/items/string/tasks/disconnect" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"deleteTask": false
}'const response = await fetch("https://leadtime.app/api/public/projects/string/items/string/tasks/disconnect", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"deleteTask": false
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/projects/string/items/string/tasks/disconnect",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"deleteTask": False
},
)Response
{
"success": true
}Invalid request: invalid projectId or itemId format, or validation error in request body
Unauthorized - Invalid or missing authentication token
Insufficient permissions to manage components or access to project denied
Project not found, item not found, item does not belong to the project, or no tasks are connected to the item