latestOpenAPI 3.0.32026-08-19299284712.8 KB
67d9f45bb99b
Taskflow
Bulk create and update Tasks
Executes a batch of Task operations (creates and updates) for a single Workflow Process.
Request Rules:
- Only In Progress or Not Started Processes are permitted
- Tasks with an id are treated as updates
- Tasks without an id (or id: null) are treated as creates
- Updates are processed before creates
- New tasks are always created with status DRAFT regardless of supplied value
- Only Workflow Managers can access this endpoint
Resources:
- Each task supports a resources array of {id, content_type} objects
- Valid content_type values: dashboard, template, templateupload, canvas
- Maximum of 1 resource per task
- Omit resources to preserve existing; set to [] to clear all
- User must have view access to a resource to assign it
- Restricted resources are returned with permission_denied: true and content: {}
Response Behavior:
- Returns 400 for request-level validation errors (invalid process_id, missing tasks, duplicate task IDs)
- Returns 200 with per-task results for individual task operations (partial success supported)
- Each result has task (data or null) and errors (null or error details)
- On update failure, task contains current state; on create failure, task is null
Per-Task Error Structure (flat array):
- Each error has: code, detail, and source
- Field errors: source: { field: "name" } with DRF codes (null, required, invalid)
- Business errors: source: null with custom codes (INVALID_DATE_PAST_DUE, DUPLICATE_NAME)
- Multiple errors can be present on a single task
post/tasks/bulk
Headers
X-Company-IDstring required
Associates request with company