mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #1601] Support importing Postman Environments #504
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#504
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kiriti999 on GitHub (Apr 14, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1601
Describe the bug
Unable to import or delete environment json variables properly from postman
The imported env variables has blank labels and not able to delete them
To Reproduce
Steps to reproduce the behavior:
Screenshots




Desktop (please complete the following information):
Additional context
I am trying to import this JSON file from postman:
@liyasthomas commented on GitHub (Apr 15, 2021):
Hi @kiriti999
As of now, Hoppscotch Environment importer doesn't support Postman Environments completely. It's actually possible and I'll look into this implementation ASAP.
@kiriti999 commented on GitHub (Apr 26, 2021):
Hi @liyasthomas Any update?
@liyasthomas commented on GitHub (Apr 27, 2021):
I suppose this will require some more time since the way Postman uses the environment variable notaions is different than that of Hoppscotch. In Hoppscotch we prefer
<<variable_name>>whereas in Postman it's{{variable_name}}notation. We'll look into this on a later period. Thanks for the patience.NOTE: feel free to raise a PR to add support for Postman environment variables if you're interested in this feature. @kiriti999
@kiriti999 commented on GitHub (May 10, 2021):
@liyasthomas I wish I could. If you can guide me which files needs to be touched to implement this feature, I can give it a try.
@liyasthomas commented on GitHub (May 10, 2021):
https://github.com/hoppscotch/hoppscotch/blob/main/components/environments/ImportExport.vue
This component handle Importing environments from JSON.
@ayoubfaouzi commented on GitHub (Sep 18, 2021):
Would be lovely to have this one working. Got the same issue, blank urls.
@liyasthomas commented on GitHub (Sep 30, 2021):
Hi @deepto98, thanks for showing interest in contributing to Hoppscotch. You're free to work on this. Let us know if you've any doubts. Assigning this to you.
@jorgetovar commented on GitHub (Nov 17, 2021):
@deepto98 could you please link the pull request? I want to contribute without duplicating the work
@rakshit087 commented on GitHub (Dec 7, 2021):
It seems to work for me as well.
I am using the same json file as @kiriti999.
I also found this function
This function is executed if
importFileObj._postman_variable_scope === "environment" || importFileObj._postman_variable_scope === "globals"which seems to work for any postman environment.Can someone confirm? Let me know if something is wrong with the function, would love to contribute 👽
@kritikmodi commented on GitHub (Dec 7, 2021):
Hi @deepto98 , is the issue resolved or are you working towards developing the solution as of now?
@samuelj90 commented on GitHub (Feb 24, 2022):
@kritikmodi This feature is working fine with latest version.
@liyasthomas I think this issue can be closed.
@boardtc commented on GitHub (Sep 8, 2022):
I am using the windows app. In environments, I select Import / Export and choose "Import from Hoppscotch" (should this not be Import JSON? ) and select my Postman environment JSON file, which is the format as shown by the OP and contains 48 keys. Hoppscotch reports back that the file is imported and the environment shows in the list under global. However, clicking on it does not expand any keys at all and the environment does not appear to be accessible / imported at all. Any thoughts please?
@iDschepe commented on GitHub (Oct 1, 2022):
I was searching for a tool to convert postman exported environment zip file to a hoppscotch importable json file.
Unfortunately, I couldn't find, so I decided to share my results:
https://github.com/iDschepe/hoppscotch-transformer
It will also try to convert used variables within other variable values.
Feel free to contribute or give any feedback!