Browse documentation

Variables and environments

Variables give values to a request when it runs. Write ${name} to use one. See Variables and expressions.

Environments and request variables work in request tabs, which are included in the trial and in Professional and Enterprise.

Scopes and precedence

If more than one source defines a name, the last source in this list wins:

  1. Global environment: for all collections.
  2. Collection environment: for one collection.
  3. CLI input: a --input value, when the CLI runs the request.
  4. Request variables: in the request file.
  5. Results of operations that already ran.

Dynomate uses only the selected environments and their enabled variables. See Precedence.

Configure environments

A request tab shows the Global and Collection environment selectors in the title bar.

  1. In the title bar, select Global or Collection.
  2. Select Configure Environments....
  3. Enter a name in New Environment Name.
  4. Select +.
  5. Select Add Variable.
  6. Enter the variable name and value.
  7. Select Save Changes.
  8. Select Close.
  9. Select the environment in the title bar.
  • Select None to use no environment from that scope.
  • Clear Enabled to keep a variable but not use it.
  • Bulk Edit takes one NAME=VALUE on each line. You can also import a .env file.
  • The copy button on a row copies the ${name} reference.
  • Mark as secret masks a value. See Storage and secrets.
  • A change of environment after a run makes the results out of date.

Request variables

  1. Select Request settings at the bottom of the rail.
  2. Under Variables, enter a name.
  3. Select Add field.
  4. Select the type of the value.
  5. Enter the value.
  6. Select Save.

A request variable can have any type. Dynomate saves it in the [variables] table:

DNML
[variables]accountId = "account#42"pageSize = "1"

Dynomate does not expand templates in [variables], for example "${other}".

Use a variable

A template can be a full value or part of a string:

Text
${accountId}
Text
arn:aws:dynamodb:${region}:123456789012:table/Orders-${stage}
  • In text fields, type the template. In Table ARN and AWS profile, type ${ to see suggestions.
  • In number, Yes/No, list, and map fields, select Use expression first. See Values and expressions.
  • In a DynamoDB expression, set a :value alias to the template. See Placeholders and aliases.

If no selected source defines a name, Dynomate shows an error before the run.

Casts

Environment values are text. To use one as a number or a boolean, cast it:

Text
${cast(pageSize, 'integer')}

For the supported types, see Casts.

Storage and secrets

  • Request variables: in the .dnml file.
  • Collection environments: in environments/<name>.json in the collection folder.
  • Global environments: in the local app data.

A collection environment file is a JSON list:

JSON
[  {    "name": "accountId",    "value": "account#42",    "enabled": true,    "isSecret": false  }]

Dynomate shows secret values as [REDACTED] in results, messages, endpoint summaries, and the confirmation dialog. The file still contains the plain value.