envVars(): Dictionary<String>

Returns all the environment variables defined in the host system as an array of strings.


This example returns a Mac command console (SHELL) path. SHELL is one of the standard Mac environment variables. To return all the environment variables, you can use dw::System::envVars().


%dw 2.0
import dw::System
output application/json
{ "envVars" : dw::System::envVars().SHELL }


{ "envVars": "/bin/bash" }

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub
Submit your feedback!
Share your thoughts to help us build the best documentation experience for you!
Take our latest survey!