See the following discussions in the Postman project:
- For Environments
- Variables
- For Collections
- Variables
- Folders (can be nested)
- Requests
- Requests' Params
- Requests' Examples (including example's Params)
-
In Postman, export a Collection or Environment to a JSON file (e.g.
unsorted.json
) inv2.1
format. -
Run
python3 pm-sort.py unsorted.json > sorted.json # or python3 pm-sort.py < unsorted.json > sorted.json
-
In Postman, import
sorted.json
. (To be safe, chooseImport as Copy
when prompted.)