Skip to main content
POST
/
api
/
v1
/
workflows

List Workflows

curl -X GET http://localhost:8002/api/v1/workflows \
  -H "X-API-Key: your-api-key"

Response

200 Success
{
  "workflows": [
    {
      "name": "daily-report",
      "description": "Generate daily project report",
      "schedule": "0 9 * * *",
      "enabled": true,
      "lastRun": "2025-10-31T09:00:00Z",
      "nextRun": "2025-11-01T09:00:00Z"
    }
  ]
}

Create Workflow

curl -X POST http://localhost:8002/api/v1/workflows \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-api-key" \
  -d '{
    "name": "daily-report",
    "description": "Generate daily report",
    "schedule": "0 9 * * *",
    "tasks": [
      {
        "name": "generate-report",
        "type": "script",
        "script": "python generate_report.py"
      }
    ]
  }'

Response

201 Created
{
  "name": "daily-report",
  "status": "created",
  "nextRun": "2025-11-01T09:00:00Z"
}

Run Workflow Now

curl -X POST http://localhost:8002/api/v1/workflows/daily-report/run \
  -H "X-API-Key: your-api-key"

Response

200 Success
{
  "executionId": "exec_abc123",
  "workflow": "daily-report",
  "status": "running",
  "startedAt": "2025-10-31T12:00:00Z"
}

Delete Workflow

curl -X DELETE http://localhost:8002/api/v1/workflows/daily-report \
  -H "X-API-Key: your-api-key"

Next Steps