Environment JSON File Creation without populating values in "INITIAL VALUE"

Our team has an app that automatically generates environment JSON file. This file follows the example structure given below

{
  "name": "testEnv",
  "values": [
    {
      "enabled": true,
      "key": "path",
      "value": "post",
      "type": "text"
    },
    {
      "enabled": true,
      "key": "foo",
      "value": "bar",
      "type": "text"
    }
  ],
}

When our developers import this file, the values are automatically getting populated in “INITIAL VALUE” field, thus syncing whatever the variables are to postman servers.

Trying to see if it’s possible to generate the JSON file in such a way that the postman client will only populate values in “CURRENT FIELD” and there by not syncing the variables to postman servers. Any help is much appreciated.

Hey @krishna,

Welcome to the community! :star:

Firstly, I would love to see the app you’ve developed to automatically create environment files…sounds really cool!! :trophy:

So for your question, by design the Current Values are only for local use and are not sync’d to the server through the app or part of the exported files. You wouldn’t be able to share an environment that only has your current values.

With the format that you have, it’s going to always add the string to both the Current and Initial value fields.

You could do something like this which would create the environment file with the path and foo variable placeholders, the other members of your team could import the file and then fill only the Current Values on their own machine.

{
	"name": "testEnv",
	"values": [
		{
			"key": "path",
			"value": "",
			"enabled": true
		},
		{
			"key": "foo",
			"value": "",
			"enabled": true
		}
	]
}

@danny-dainton Thanks for the prompt response! It looks like there isn’t a way to mark something as a credential, which could prevent populating values in Current Values.

Is it possible to implement this feature? Something like this:

{
	"name": "testEnv",
	"values": [
		{
			"key": "Authorization",
			"value": "",
			"enabled": true
            "type": "secret"
		}
	]
}

Creating a type of secret could let Postman client know that it is a secret and hence should not populate the value in Current Value.

Just checking back if there’s any update on the ask here. It would be super helpful if we could find a way to not automatically populate the secrets in CURRENT VALUE when using json to populate environment values.