【发布时间】:2014-03-31 20:24:45
【问题描述】:
在此用例中,在 API 代理中,必须访问组织中每个开发人员的自定义属性。
我知道调用“https://api.enterprise.apigee.com/v1/o/org_name/developers”会提供所有开发者的电子邮件(用户名)列表,然后我可以使用“https://api.enterprise.apigee.com/v1/o/org_name/developers/dev1_email@abc.com”获取特定的开发者帐户。
我尝试使用服务标注策略来获取所有开发者的列表,并返回开发者电子邮件:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout async="false" continueOnError="false" enabled="true" name="get-developer-list">
<DisplayName>Get Developer List</DisplayName>
<Request learPayload="true" variable="DeveloperListRequest"/>
<Response>DeveloperList</Response>
<HTTPTargetConnection>
<URL>https://api.enterprise.apigee.com/v1/o/myOrg/developers</URL>
</HTTPTargetConnection>
</ServiceCallout>
但是,这需要用户名和密码,可以通过分配消息策略设置。如何做到这一点?这是总体上正确的方法还是有其他方法?
【问题讨论】:
标签: apigee