I have been asked to create an Apigee endpoint that receiving a payload and call another endpoint.
No problem. It's do something like this:
I call apigee.com/myApiProxy -> OurCompanyApi.com
But they asked me to upgrade the links and send the payload up to 3 other APIs if conditions are made.
So I receive a payload and if the "newsletter" variable is set to true I'm supposed to do:
apigee.com/myApiProxy -> OurCompanyApi.com
AND
apigee.com/myApiProxy -> OurCompanyApi.com/NewsletterSubscribe
And another variable for another subscription
apigee.com/myApiProxy -> OurCompanyApi.com/OtherSubscription.
Right Now I get every variable from the payload in a javascript file.
Now the question: Can I redirect up to 3 links ?
Thanks
you can send it to three different URLs using a service callout or javascript http client.
Thanks will look at this. I will search for example.
@Nagashree B, do you have some example or video about service callout for Apigee? I search and didn't find good stuff. Thanks
There are a few github samples - https://github.com/apigee/api-platform-samples/tree/master/learn-edge/service-callout-1 and service-callout-2
You can take a look at https://docs.apigee.com/api-platform/samples/cookbook/using-policy-composition.html & https://github.com/apigee/api-platform-samples/tree/master/doc-samples/policy-mashup-cookbook as well.