Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Apigee route post to get api

I have a GET API exposed as (www.example.com/find/cola?id=lite,fiz)

From Apigee I want to expose a POST API instead of GET like (www.example.com/api/find)

Body {id:['cola','fiz']}

Is it possible to accept post api and transform and route as get from apigee proxy ?

 
0 1 113
1 REPLY 1

Yes.

You can do it by setting verb in assign https://docs.apigee.com/api-platform/reference/policies/assign-message-policy#setbefore calling target endpoint & you can expose proxy endpoint as POST.

<Verb>GET</Verb>

C <-- /api/find(/POST) --> you process the request/logic in apigee  & override the verb using assign to GET & call target (assuming you are not passing payload or back end expects any payload which is anti-pattern/doesn't apply  on GET).

Good read..

https://www.rfc-editor.org/rfc/rfc7231#page-24