在 Debian 下使用 Postman 导出接口/集合(Collection)或环境(Environment),方法和 Windows / macOS 基本一致,因为 Postman 主要是图形界面程序。下面分几种常见情况说明:
~/Documents/)导出后会得到一个 .json 文件,例如:
~/Documents/MyAPI.postman_collection.json
.json 文件示例:
~/Documents/dev.postman_environment.json
.json如果你是在 无界面 Debian 服务器 上:
npm install -g newman
newman run MyAPI.postman_collection.json -e dev.postman_environment.json
curl -X GET \
"https://api.getpostman.com/collections/{collection_uid}" \
-H "X-Api-Key: YOUR_API_KEY"
Postman 数据一般位于:
~/.config/Postman/
导出的文件默认在你选择的目录,不受系统限制。
如果你是想:
可以告诉我你的具体使用场景,我可以给你更合适的方案。