Task Endpoints
Task Management
Submit Task
Submit a task for execution.
1POST /api/v1/tasks2Authorization: Bearer <token>3Content-Type: application/json45{6 "task_type": "send_email",7 "task_queue": "notifications",8 "input": {9 "to": "customer@example.com",10 "subject": "Order Confirmation",11 "body": "Your order has been confirmed."12 },13 "timeout": 60,14 "retry_policy": {15 "max_attempts": 316 }17}Response:
1{2 "task_id": "task_xyz123",3 "status": "queued",4 "created_at": "2024-01-07T12:00:00Z"5}Get Task Status
1GET /api/v1/tasks/:task_id2Authorization: Bearer <token>Response:
1{2 "task_id": "task_xyz123",3 "task_type": "send_email",4 "status": "completed",5 "result": {6 "message_id": "msg_abc789",7 "sent_at": "2024-01-07T12:00:15Z"8 },9 "started_at": "2024-01-07T12:00:01Z",10 "completed_at": "2024-01-07T12:00:15Z",11 "attempt": 1,12 "duration_ms": 1400013}Cancel Task
1DELETE /api/v1/tasks/:task_id2Authorization: Bearer <token>Response:
1{2 "task_id": "task_xyz123",3 "status": "canceled",4 "canceled_at": "2024-01-07T12:00:30Z"5}List Tasks
1GET /api/v1/tasks?task_type=send_email&status=completed&limit=502Authorization: Bearer <token>Response:
1{2 "tasks": [3 {4 "task_id": "task_xyz123",5 "task_type": "send_email",6 "status": "completed",7 "created_at": "2024-01-07T12:00:00Z"8 }9 ],10 "total": 250,11 "limit": 50,12 "offset": 013}Next Steps
- Workflow Endpoints -- Execute, monitor, and manage workflow executions
- Management Endpoints -- Users, organizations, and registry
- Errors & Limits -- Error handling and rate limiting
- Best Practices & Examples -- Usage patterns and code examples