3 answers

When you define an environment inline, you pass it with the "env" key as part of the [params] argument (which is in JSON format IIUC). I'm not sure how that applies to predefined environments created through the API though.

I don't think there is a way to link a pre-existing environment. You could, however, have a task in the workflow that fetches the environment. This workflow takes the name of a environment, it then fetches it and outputs the contents of the environment.

Comments

This worked me too, provided that mistral.environments_get is working. I bet d0ugal's example worked when he posted it. I ran into an issue where it didn't work for me with mistral client 3.1.0 until I applied a fix destined for 3.1.1. Details in bug: https://bugs.launchpad.net/mistral/+bug/1696128 (https://bugs.launchpad.net/mistral/+b...)