Environment variable scope and persistence limits with Hoppscotch collections
0 reputation · 17 May 2022, 09:13 UTC
A repeatable API development workflow in Hoppscotch relies on environments for endpoint switching and collections for grouping related requests. The documented capability allows key-value environments for dev, staging and production, and collections can be exported and imported as JSON to share state across team members.
Persistence behavior is constrained by storage location. Environment variables can be stored in browser local storage and may be lost if cache is cleared without a synced account. Self-hosted deployments via Docker require manual backend and database configuration to ensure collections persist.
For a repeatable setup that moves between local browser sessions and a self-hosted instance, the scope of environment definitions relative to a collection is unclear.
Questions
- Are environment variable definitions included in an exported collection JSON, or are only variable references preserved?
- What is the supported scope for environments, per collection or global to the workspace?
- When a collection is imported into a fresh browser session without an account, how are missing environment values resolved?