magento2 rest API 导入到postman

亡梦爱人 提交于 2020-02-27 17:27:24

一共三步

  1. 通过后台账号密码 或者token
curl -X POST "http://m2.host/index.php/rest/V1/integration/admin/token" -H "Content-Type:application/json" -d '{"username":"admin", "password":"your-password"}'
  1. 通过token 获取所有API json
curl -X POST http://m2.host/index.php/rest/default/schema -H "Authorization: Bearer idcfdipbei9ydpoobgns7tl0uhvaur10" > magento2.api.schema.json
  1. 导入到postman
    通过postman 左上角 , 导入 magento2.api.schema.json 到postman在这里插入图片描述
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!