Export env vars added through the API

This PR adds support of env variables added through the API.