Updating the Flows for an IoT Flow Runtime

Add or replace the complete Node-RED flows.json for an IoT Flow Runtime.

Each IoT Flow Runtime has one OCID and one complete Node-RED flows.json file, it can contain multiple Node-RED flows. You can export the flows from Node-RED as a JSON document and add or replace the flows.json file on the Flow Runtime's Flows tab.

Use the Node-RED editor to create or import flows interactively, and select Deploy to apply the editor configuration. To add or replace the complete flows document on the Flow Runtime resource, use the Console, CLI, or API.

To update the properties for an OCI IoT Flow Runtime, see Updating an IoT Flow Runtime.

    1. On the IoT domains list page, select the domain with the flow runtime you want to work with, and then select Flow runtimes. If you need help finding the IoT domains list page, see Listing IoT Domains.
    2. Select the Flow runtime name to open the IoT Flow Runtime details page.
    3. Select Flows.
    4. Add the exported Node-RED flows JSON.
      Note

      Adding a flows JSON replaces the complete flows configuration. To avoid removing flows unintentionally, retrieve the current flows JSON or export it from Node-RED and save a backup before updating it.
    5. Confirm that the Flow Runtime shows the updated flows configuration.
  • Use the oci iot flow-runtime update-flows command and required parameters to replace the complete flows JSON for an IoT Flow Runtime. Replace <flow-runtime-OCID> with the IoT Flow Runtime OCID and <path-to-flows-json> with the path to the exported Node-RED JSON file.

    oci iot flow-runtime update-flows --iot-flow-runtime-id <flow-runtime-OCID> --flows-document file://<path-to-flows-json>
    Note

    The command replaces the complete flows configuration. To avoid removing flows unintentionally, retrieve the current flows document and save a backup before updating it.

    For a complete list of parameters and values for CLI commands, see CLI Command Reference.

  • Run the UpdateIotFlowRuntimeFlows operation to replace the complete flows JSON configuration for an IoT Flow Runtime.

    PUT /20250531/iotFlowRuntimes/{iotFlowRuntimeId}/flows
    [
      {
        "id": "my-hello-world-json",
        "type": "inject",
        "name": "Inject Hello World JSON"
      }
    ]

    Pass the complete opaque Node-RED flows JSON as the request body. The service passes the JSON through to the IoT Flow Runtime without interpreting or transforming its contents.

    The operation is synchronous and returns the flows JSON in the response. It doesn't create a work request.