Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Generate tasks from a component item

Generate tasks from a component item and its children. The endpoint recursively processes items (two levels deep), skips Epic items, and only creates tasks for items that don’t already have associated tasks. Can be used with either a Component ID or a ComponentItem ID.

POST/projects/{projectId}/items/{itemId}/tasks/generate
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
projectIdstringrequired
itemIdstringrequired
Query parameters
fieldsToReturnstring

Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.

responseShapestring

Advanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.

Allowed:compactfull
Header parameters
LT-Response-Shapestring

Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.

Allowed:full
Request body
requiredapplication/json
itemTypestringrequired

Type of item to generate tasks from

Allowed:ComponentComponentItem
Responses
200

Tasks generated successfully

componentItemsCountnumberrequired

Total number of component items processed

createdTasksCountnumberrequired

Number of tasks created

tasksNumbersnumber[]required

Array of task short numbers for created tasks

400

Invalid request: invalid projectId, itemId format, or itemType value. Items may already be generating.

401

Unauthorized - Invalid or missing authentication token

403

Insufficient permissions to manage components or access to project denied

404

Project not found, item not found, or item does not belong to the project

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://leadtime.app/api/public/projects/string/items/string/tasks/generate" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "itemType": "ComponentItem"
}'
Response
{
  "componentItemsCount": 8,
  "createdTasksCount": 5,
  "tasksNumbers": [
    123,
    124,
    125,
    126,
    127
  ]
}