Please find attached an example script for exporting a bundle from a design node and deploying it to automation.
#Define the connections
host = "http://localhost:12345" # example to be changed
apiKey = "Foo123Foo123F123Foo123" # example to be changed
host_auto = "http://localhost:23456" # example to be changed
apiKey_auto = "Bar234Bar234Bar234Bar234" # example to be changed
design_client= dataikuapi.DSSClient(host, apiKey)
auto_client = dataikuapi.DSSClient(host_auto, apiKey_auto)
version_bundle = "bundle_v1"
project = design_client.get_project("MYSUPERPROJECT")
project_automation = auto_client.get_project("MYSUPERPROJECT")
# Preload and activate bundle
project_automation.preload_bundle(version_bundle) # for code envs
Note that it works also outside of DSS, which is why you need the API keys. To generate these, you can go to Administration > Security > Global/Personal API keys on the Design and Automation nodes.
At the moment, there is no way through the dataiku API to perform custom remapping of the connections. We assume that the connections are already setup and share the same logical name (although their inner values are different). Having said that, if you have already setup the custom remapping in the interface, promoting a new bundle through the API will keep the custom remapping.