【发布时间】:2016-06-20 14:17:21
【问题描述】:
我通过 Apigee Edge 通过 REST 接口公开 JSON。
在外部,API 使用者将看到以下 API 规范:
即创建客户。
POST /customers?api_key=ABC123
{
"name": "John",
"surname": "Smith"
}
我已应用以下政策: 1.验证API Key 2. 移除 API Key
我想知道在调用我的下游系统时如何使用提取/分配消息策略来实现以下“重构”请求负载。
POST /downstream-customer-service
{
"correlationId": "<generated guid>",
"data": {
"name": "John",
"surname": "Smith"
}
}
所以,我需要: 1.移动原始请求体,并将其添加到“数据”元素 2.生成一个GUID并分配给“correlationId”
我假设我还需要一个 javascript 策略?或者这可以仅在 javascript 策略中实现吗?
提前谢谢你。
【问题讨论】:
标签: javascript apigee