trigger-cloudflow-flow
dci trigger-cloudflow-flow <flowId> [body]
Starts a run of a published flow whose first node is a webhook, scheduled, or manual
trigger. A draft flow is rejected with 422 — use actions/test-run to run one.
No Idempotency-Key is required. This is a state transition, not a resource creation.
The response is a snapshot taken at dispatch, so status is always pending and the
timing fields are not yet populated. Read the run back through
GET /cloudflow/v1/flows/\{flowId\}/runs/\{runId\} to follow its progress.
A flow holds a concurrency lock while it runs, so triggering one that is already running
returns 409 with the active run embedded in the problem body — no second lookup needed.
flowId— The ID of the flow to trigger.
Pass the request body as name: value arguments or pipe JSON on stdin — see Command structure.
Request
Content-Type: application/json
Raw JSON schema
{
"type": "object",
"description": "Optional JSON payload forwarded to the trigger node. Omit or send `{}` for flows\nthat need no input."
}
Output
The run was started. The snapshot is taken at dispatch, so status is pending.
By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.
| Field | Type | Description |
|---|---|---|
id | string | |
flowId | string | |
flowName | string | |
status | string | One of: "pending", "running", "complete", "completed-with-errors", "pending-approval", "failed", "sleeping", "stopped". |
isTest | boolean | True when the run was started through actions/test-run. |
triggeredBy | string | |
triggerTime | string (date-time) | |
startTime | string (date-time) | |
endTime | string (date-time) | |
error | string | |
stoppedBy | string |
Raw JSON schema
{
"type": "object",
"description": "A run without its per-node detail.",
"required": [
"id",
"flowId",
"status",
"isTest",
"triggeredBy",
"triggerTime"
],
"properties": {
"id": {
"type": "string"
},
"flowId": {
"type": "string"
},
"flowName": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"pending",
"running",
"complete",
"completed-with-errors",
"pending-approval",
"failed",
"sleeping",
"stopped"
]
},
"isTest": {
"type": "boolean",
"description": "True when the run was started through `actions/test-run`."
},
"triggeredBy": {
"type": "string"
},
"triggerTime": {
"type": "string",
"format": "date-time"
},
"startTime": {
"type": "string",
"format": "date-time"
},
"endTime": {
"type": "string",
"format": "date-time"
},
"error": {
"type": "string",
"nullable": true
},
"stoppedBy": {
"type": "string",
"nullable": true
}
}
}
Errors
On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.
HTTP status to exit code mapping
| HTTP status | Exit code | Error code | Meaning |
|---|---|---|---|
| 400, 422 | 30 | VALIDATION_ERROR | The arguments or request body were rejected. Review the command's flags and payload. |
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
| 404 | 20 | RESOURCE_NOT_FOUND | The requested resource does not exist. Check the identifier argument. |
| 409 | 21 | RESOURCE_CONFLICT | The operation conflicts with the resource's current state. |
| 429 | 50 | RATE_LIMITED | Too many requests. Retryable — the CLI reports the server-provided delay. |
| 500 | 40 | API_SERVER_ERROR | The API failed to process the request. Retryable; contact DoiT support if it persists. |
Related
- build-cloud-flow — Build a new CloudFlow from scratch
- export-cloudflow-flow — Export a flow as a portable bundle
- get-cloudflow-flow-run — Read a flow run, node by node
- import-cloudflow-flow — Import a flow bundle
- list-cloudflow-flow-runs — List a flow's runs
- list-cloudflows — List CloudFlows
- refine-cloud-flow — Refine a CloudFlow from natural language intent
- stop-cloudflow-flow — Stop a flow run
- test-run-cloudflow-flow — Test-run a flow
- trigger-cloudflow-webhook — Trigger a webhook flow
- API reference: POST /cloudflow/v1/flows/{flowId}/actions/trigger
Aliases: triggercloudflowflow