我正在评估APIGEE代理apis并通过编程部署和调用进行访问。 我下载了示例程序(api-pltform-samples-master)。在测试simpleProxy时,我运行了deploy.sh并继续收到错误:
Deploying to test on https://api.enterprise.apigee.com using batabya and batabya
Writing ../simpleProxy/deploy.sh to ./deploy.sh
Writing ../simpleProxy/invoke.sh to ./invoke.sh
Writing ../simpleProxy/apiproxy/weatherapi.xml to apiproxy/weatherapi.xml
Writing ../simpleProxy/apiproxy/proxies/default.xml to apiproxy/proxies/default.xml
Writing ../simpleProxy/apiproxy/resources/jsc/changeResponse.js to apiproxy/resources/jsc/changeResponse.js
Writing ../simpleProxy/apiproxy/resources/jsc/generateResponse.js to apiproxy/resources/jsc/generateResponse.js
Writing ../simpleProxy/apiproxy/resources/jsc/MashItUp.js to apiproxy/resources/jsc/MashItUp.js
Writing ../simpleProxy/apiproxy/resources/py/calculateAddress.py to apiproxy/resources/py/calculateAddress.py
Writing ../simpleProxy/apiproxy/resources/py/setHeader.py to apiproxy/resources/py/setHeader.py
Writing ../simpleProxy/apiproxy/resources/py/Timer.py to apiproxy/resources/py/Timer.py
Writing ../simpleProxy/apiproxy/resources/xsl/rewriteEndpoint.xsl to apiproxy/resources/xsl/rewriteEndpoint.xsl
Writing ../simpleProxy/apiproxy/targets/default.xml to apiproxy/targets/default.xml
导入失败到/ v1 / organizations / batabya / apis?action = import& name = weatherapi,状态为401:
如果“状态:已部署”,则可以调用您的API代理。 运行'$ sh invoke.sh' 如果出现错误,请确保在/setup/setenv.sh
中设置了正确的帐户设置仅供参考:我创建了具有管理员权限的个人资料。
答案 0 :(得分:2)
401错误表示身份验证问题。这里有3个因素包括身份验证:(1)组织名称,(2)用户名和(3)密码。
(2)组织名称和(2)用户名是在setenv.sh中配置的。从deploy.sh。
提示输入(3)密码确保您已通过修改setenv.sh中的以下两行来设置您的组织和用户名:
org="Enter the name of your organization here"
username="Enter your Apigee username"
答案 1 :(得分:1)
一个重要的澄清:
username =“输入您的Apigee用户名”
此值必须是与您在enterprise.apigee.com上的帐户相关联的电子邮件地址。
我们将更新自述文件以澄清这一点。