Open
Description
Code of Conduct
- I have read and agree to the Insomnia Docs project's Code of Conduct.
What article on docs.insomnia.rest is affected?
https://docs.insomnia.rest/insomnia/pre-request-script
What part(s) of the article would you like to see updated?
Variables Manipulation
Additional information
Hello,
I am writing some scripts for Insomnia collections and found it difficult to understand how variables are evaluated. I would be great to include additional info in the documentation, for example:
- There are multiple objects that I can use to get variables:
insomnia.environment, insomnia.baseEnvironment, insomnia.variables
- it would be great to have an implicit documentation that would state which object reference which variables (base configuration, collection environment, folder variables). - We have multiple levels of configuration, it would be grate do have documentation that states how they are evaluated, is sub-config json merged with the parent config or it override all? Same for collection config and sub configs, directory variables.
- How to access folder variables and how are they merged in the folder hierarchy. I have collection env with variable
x=col-env-value
, and I also added a folder, on which I created environment variablex=dir-env-value
. How this folder level variable can be accessed in script? Script is on parent folder, variables on child folder.
Best regards,
Bartek
Code of Conduct and Community Expectations
- I agree to follow this project's Code of Conduct
- I agree to abide by the Community Expectations
Metadata
Assignees
Labels
No labels