一共三步

  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"}'
  • 通过token 获取所有API json
curl -X POST http://m2.host/index.php/rest/default/schema -H "Authorization: Bearer idcfdipbei9ydpoobgns7tl0uhvaur10" > magento2.api.schema.json
# default  表示store code
  • 导入到postman 通过postman 左上角 , 导入 magento2.api.schema.json 到postman
最后修改日期: 2020-10-28

作者