Skip to main content

refine-cloud-flow

dci refine-cloud-flow <flowId> [body]

Refines the specified CloudFlow by generating and updating nodes and connections based on the provided natural language intent. The operation streams incremental build events as they are produced.

  • flowId — Identifier of the resource.

Pass the request body as name: value arguments or pipe JSON on stdin — see Command structure.

CLI result shape

Like build-cloud-flow, the event stream is parsed into flowId, conversationId, the builder's answer, and the build steps that ran.

Verify that the change was saved

A refine round can answer with a plan yet save nothing (few steps, none of them saving node parameters). Re-export with dci export-cloudflow-flow <flow-id> after every refine and diff the bundle before believing the change happened. dci refine-cloudflow is accepted as an alias.

Examples

# Ask the builder to change an existing flow.
dci refine-cloud-flow <flow-id> question: "Add an approval step before the node that deletes disks"
# Continue the conversation that built the flow, answering its clarifying question.
dci refine-cloud-flow <flow-id> question: "Use the finance-reports dataset", conversationId: <conversation-id>
# A longer instruction read from a file (free text with commas must go through stdin).
dci refine-cloud-flow <flow-id> < refine.json
# refine.json
{"question": "Rename the flow to Weekly AWS spend to DataHub, change the schedule to Fridays at 17:00 UTC, and post the run link to Slack when it finishes."}

Request

Content-Type: application/json

FieldTypeRequiredDescription
questionstringyesNatural language description of what to refine or modify in the CloudFlow.
conversationIdstringID of an existing conversation to continue. When omitted, a new conversation is started.
Raw JSON schema
{
"type": "object",
"required": [
"question"
],
"properties": {
"question": {
"type": "string",
"description": "Natural language description of what to refine or modify in the CloudFlow."
},
"conversationId": {
"type": "string",
"description": "ID of an existing conversation to continue. When omitted, a new conversation is started."
}
}
}

Output

OK - Refine event stream.

By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.

Returns: string

Raw JSON schema
{
"type": "string"
}

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 statusExit codeError codeMeaning
40030VALIDATION_ERRORThe arguments or request body were rejected. Review the command's flags and payload.
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.
4061API_ERRORThe request failed; the printed error message has details.
500, 50240API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: refinecloudflow