Hi Team,
We need to write a CSV file to an external server every time an API is called.
please advise the feasibility and how can we achieve this.
Using the ServiceCallout policy in your API Proxy, you can send out a CSV .
If you need to send out a CSV for every request for every proxy, then I suggest embedding that ServiceCallout into a Shared Flow, and then attaching that SharedFlow to a FlowHook, so that you don't have to configure the same policy/step for each proxy in your environment. (FlowHooks give you the ability to "automatically attach policies" for each environment)
Thanks @dchiesa1 for the response
Only for a specific proxy we need to do that. So we will use a Service Call out policy.
https://docs.apigee.com/api-platform/reference/policies/service-callout-policy
As per the above documentations, we need to call and end point . But in our case we just need to place a CSV file in an external server. Can this be still done without an API from back end exposed? Appreciate if you can give a small Pseudocode (or direction ) on how to do that.
@giri_apigee wrote:
Can this be still done without an API from back end exposed?
Hi Giri
Oh I see. I had assumed that the remote server, the one accepting inbound CSVs, had an HTTP listener.
Apigee in general is an HTTP reverse proxy. ServiceCallout is just one of the steps you can add to an API proxy in Apigee, and yes, that ServiceCallout step needs to connect to an HTTP endpoint. If you have a fileserver, accessible only via SSH or FTP, then .... ServiceCallout is not going to be able to connect to it.
There is no good way to directly connect to a fileserver from within an Apigee API proxy.
I can suggest a couple options.
If this one CSV writing challenge was the ONLY integration-like problem you were facing, I might take the custom-logic option. But if you have other connectivity and integration challenges, then App Integration might be a nice solution.
Does this help?
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |