Skip to main content

export-cloudflow-flow

dci export-cloudflow-flow flowId [flags]

Serializes the flow — plus every flow it references through subflow nodes — into a tenant-neutral, credential-free JSON bundle that can be imported into any tenant with the import operation. Tenant-scoped references (connections, Datastore tables, global variables) are declared as named requirements and rebound at import time; policy and Slack-channel references cannot travel and are recorded as unsupported references. The bundle never contains credentials, tenant identifiers, schedules, or execution state.

Flags

--include-variable-values: (boolean default:true)

Output

The flow bundle.

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

FieldTypeDescription
kindstringOne of: "cloudflow.doit.com/FlowBundle".
schemaVersionintegerBundle format version. The server exports the newest version and accepts every version it has ever shipped. One of: 1.
exportedAtstring (date-time)Informational export timestamp; ignored on import.
rootFlowstringKey (into flows) of the flow that was exported; the rest are its subflows.
flowsarray of object
flows[].keystringBundle-local flow key. Opaque — the server generates new IDs at import.
flows[].namestring
flows[].descriptionstring
flows[].tagsmap of array of string
flows[].triggerTypestring
flows[].firstNodestringKey of this flow's entry node.
flows[].nodesarray of object
flows[].nodes[].keystring
flows[].nodes[].namestring
flows[].nodes[].descriptionstring
flows[].nodes[].typestringNode type (e.g. triggerNode, actionNode, datastoreNode). Validated against the supported node-type set at import.
flows[].nodes[].parametersobjectNode parameters with tenant-scoped scalar references replaced by $req:/$bundle: tokens.
flows[].nodes[].approvalobjectApproval configuration without recipients (recipients are tenant-scoped and removed at export).
flows[].nodes[].approval.requiredboolean
flows[].nodes[].approval.messageany
flows[].nodes[].approval.rejectApprovalAfterTimeboolean
flows[].nodes[].approval.rejectTimeValueinteger
flows[].nodes[].approval.rejectTimeUnitstring
flows[].nodes[].transitionsarray of object
flows[].nodes[].transitions[].targetstringKey of the node this transition points at.
flows[].nodes[].transitions[].labelstring
flows[].nodes[].transitions[].pathIdstring
flows[].localVariablesarray of object
flows[].localVariables[].keystring
flows[].localVariables[].namestring
flows[].localVariables[].descriptionstring
flows[].localVariables[].requiredboolean
flows[].localVariables[].typestring
flows[].localVariables[].elementTypestring
flows[].localVariables[].valueanyPresent unless the export stripped variable values. Connection-typed values are $req:connections/<key> tokens.
flows[].unsupportedReferencesarray of objectTenant-scoped references removed at export (policy IDs, Slack channels); import flags the affected nodes incomplete.
flows[].unsupportedReferences[].nodeKeystring
flows[].unsupportedReferences[].kindstringOne of: "policy", "slackChannel".
flows[].unsupportedReferences[].detailstring
requirementsobjectTenant-scoped resources the bundle needs; each is bound to a target-tenant resource at import.
requirements.connectionsarray of object
requirements.connections[].keystring
requirements.connections[].providerstringCloud provider the bound connection must have (e.g. amazon-web-services).
requirements.connections[].namestringThe source connection's display name, as a matching hint.
requirements.connections[].usedByNodesarray of string
requirements.datastoreTablesarray of object
requirements.datastoreTables[].keystring
requirements.datastoreTables[].namestring
requirements.datastoreTables[].descriptionstring
requirements.datastoreTables[].fieldsarray of object
requirements.datastoreTables[].fields[].namestring
requirements.datastoreTables[].fields[].dataTypestring
requirements.datastoreTables[].fields[].isUniqueboolean
requirements.datastoreTables[].fields[].descriptionstring
requirements.datastoreTables[].usedByNodesarray of string
requirements.globalVariablesarray of object
requirements.globalVariables[].keystring
requirements.globalVariables[].namestring
requirements.globalVariables[].descriptionstring
requirements.globalVariables[].typestring
requirements.globalVariables[].elementTypestring
requirements.globalVariables[].valueanyPresent unless the export stripped variable values.
requirements.globalVariables[].usedByNodesarray of string
Raw JSON schema
{
"type": "object",
"description": "Portable, tenant-neutral export of one or more flows. Contains no credentials, tenant identifiers, schedules, or execution state; tenant-scoped references are declared under `requirements` and appear inside node parameters as `$req:<section>/<key>` tokens (subflow references as `$bundle:flows/<flowKey>`).",
"required": [
"kind",
"schemaVersion",
"rootFlow",
"flows"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"cloudflow.doit.com/FlowBundle"
]
},
"schemaVersion": {
"type": "integer",
"description": "Bundle format version. The server exports the newest version and accepts every version it has ever shipped.",
"enum": [
1
]
},
"exportedAt": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "Informational export timestamp; ignored on import."
},
"rootFlow": {
"type": "string",
"description": "Key (into `flows`) of the flow that was exported; the rest are its subflows."
},
"flows": {
"type": "array",
"maxItems": 20,
"items": {
"type": "object",
"required": [
"key",
"name",
"firstNode",
"nodes"
],
"properties": {
"key": {
"type": "string",
"description": "Bundle-local flow key. Opaque — the server generates new IDs at import."
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
},
"triggerType": {
"type": "string",
"nullable": true
},
"firstNode": {
"type": "string",
"description": "Key of this flow's entry node."
},
"nodes": {
"type": "array",
"maxItems": 150,
"items": {
"type": "object",
"required": [
"key",
"name",
"type"
],
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string",
"description": "Node type (e.g. `triggerNode`, `actionNode`, `datastoreNode`). Validated against the supported node-type set at import."
},
"parameters": {
"type": "object",
"additionalProperties": true,
"description": "Node parameters with tenant-scoped scalar references replaced by `$req:`/`$bundle:` tokens."
},
"approval": {
"type": "object",
"description": "Approval configuration without recipients (recipients are tenant-scoped and removed at export).",
"properties": {
"required": {
"type": "boolean"
},
"message": {},
"rejectApprovalAfterTime": {
"type": "boolean"
},
"rejectTimeValue": {
"type": "integer"
},
"rejectTimeUnit": {
"type": "string"
}
}
},
"transitions": {
"type": "array",
"items": {
"type": "object",
"required": [
"target"
],
"properties": {
"target": {
"type": "string",
"description": "Key of the node this transition points at."
},
"label": {
"type": "string",
"nullable": true
},
"pathId": {
"type": "string",
"nullable": true
}
}
}
}
}
}
},
"localVariables": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"required": [
"key",
"name",
"type"
],
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"required": {
"type": "boolean"
},
"type": {
"type": "string"
},
"elementType": {
"type": "string"
},
"value": {
"description": "Present unless the export stripped variable values. Connection-typed values are `$req:connections/<key>` tokens."
}
}
}
},
"unsupportedReferences": {
"type": "array",
"description": "Tenant-scoped references removed at export (policy IDs, Slack channels); import flags the affected nodes incomplete.",
"items": {
"type": "object",
"required": [
"nodeKey",
"kind"
],
"properties": {
"nodeKey": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"policy",
"slackChannel"
]
},
"detail": {
"type": "string"
}
}
}
}
}
}
},
"requirements": {
"type": "object",
"description": "Tenant-scoped resources the bundle needs; each is bound to a target-tenant resource at import.",
"properties": {
"connections": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"required": [
"key",
"provider",
"name"
],
"properties": {
"key": {
"type": "string"
},
"provider": {
"type": "string",
"description": "Cloud provider the bound connection must have (e.g. `amazon-web-services`)."
},
"name": {
"type": "string",
"description": "The source connection's display name, as a matching hint."
},
"usedByNodes": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"datastoreTables": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"required": [
"key",
"name",
"fields"
],
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"dataType"
],
"properties": {
"name": {
"type": "string"
},
"dataType": {
"type": "string"
},
"isUnique": {
"type": "boolean"
},
"description": {
"type": "string"
}
}
}
},
"usedByNodes": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"globalVariables": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"required": [
"key",
"name",
"type"
],
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string"
},
"elementType": {
"type": "string"
},
"value": {
"description": "Present unless the export stripped variable values."
},
"usedByNodes": {
"type": "array",
"items": {
"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 statusExit codeError codeMeaning
400, 42230VALIDATION_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.
40420RESOURCE_NOT_FOUNDThe requested resource does not exist. Check the identifier argument.
50040API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: exportcloudflowflow