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

How to handle streaming data together with normal request/response payload in a single API Proxy

Not applicable

According to the Apigee Doc on Streaming data:

http://apigee.com/docs/api-services/content/enabling-streaming

When streaming is enabled, policies that require access to the request or response payload, such as XSLT transformations and XML to JSON policies cannot be run and are bypassed.

Our customer needs a solution of handling normal request/response payload data like JSON/XML along with steaming data like image or S3 like object data in a single API proxy with respect to its resource path, query param or Content-Type or whatever which we pass with the API call.

I'll really appreciate any hints from you on how we can realize it.

Solved Solved
2 7 3,758
1 ACCEPTED SOLUTION

Not applicable

Hi @Toshihiro Shibamoto,

Do you want it on the same base path ?

When you enable streaming, payloads more than the buffer size will be streamed else they will be considered as normal requests but if your payload > buffer size and if you have any policy which tries to operate on payload , you will see buffer overflow 413 .

In your case I feel you can enable streaming and have separate flows based on content-length header for normal else consider that as streaming request . (Never tried but theoretically should work )

if no , you can have 2 different endpoints.

cc @arghya das

View solution in original post

7 REPLIES 7
Top Solution Authors