Re: [Apiman-user] Transfer Quota Policy
by Eric Wittmann
Thanks for the question Subba.
Because apiman streams the data in both directions, we don't necessarily
know whether a response will violate the transfer quota policy (at the
time the policy is being applied). Here is the sequence of events:
1) receive HTTP request
2) apply Policy to request
3) connect to back-end API
4) stream data from originating client to back-end API
5) receive HTTP response from back-end API
6) apply Policy to response
7) stream data from back-end API to originating client
8) record # of bytes transferred, update counter
So if the number of bytes from #7 exceeds the allowed amount, it will
still pass (but the *next* request will fail). There is also a race
condition where multiple concurrent requests could all get past step #6.
This is all done this way for performance reasons. If you are in need
of a stricter approach, we would need to discuss how that could be built.
-Eric
On 6/1/2016 10:47 AM, Subbarao Denduluri wrote:
> Hello Eric,
>
>
>
> We are trying to configure the transfer quota policy at the client
> app level. When we give the policy to a lower level of 2 KB , the
> first couple of request are going through even if they return a larger
> amount of data. How do we interpret the download data limit ? Is it
> size of the json the api is returning or something else?
>
>
>
> Thanks
>
> Subba
>
9 years, 10 months
Question: How to stop path segments & query parameters from going on to the back-end API endpoint?
by Manvendra.Rai@ril.com
Hello All,
I left this question on freenode - IRC and though to post the same on the email group.
Question: We are using API Gateway for couple of things and one of the main functionalities we are leveraging is - Managed API.
Our requirement is to create a Plugin which will invoke backend API after fetching fielded from the database based on the object id from the Manage URL.
Say for example -
My manage API is -
http://abc.com/apiman-gateway/testapp/manav/3.0/images/{objectid}<http://abc.com/apiman-gateway/testapp/manav/3.0/images/%7bobjectid%7d>
My Backend API
http://abc.com/apiman-gateway/testapp/manav/3.0/download/images/{fileid}<http://abc.com/apiman-gateway/testapp/manav/3.0/download/images/%7bfileid%7d>
We have implemented almost all this requirement but have one issue. As per the default behaviour, API Gateway proxies all path segments beyond the {version} segment with query parameters back-end API.
This is causing an issue because [objected] is also being sent to Backend API.
So my question is to know - how can we stop {objected} from going to Backend API?
Thanks for your time looking at the issue and advising back.
Thanks,
Manav
"Confidentiality Warning: This message and any attachments are intended only for the use of the intended recipient(s).
are confidential and may be privileged. If you are not the intended recipient. you are hereby notified that any
review. re-transmission. conversion to hard copy. copying. circulation or other use of this message and any attachments is
strictly prohibited. If you are not the intended recipient. please notify the sender immediately by return email.
and delete this message and any attachments from your system.
Virus Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email.
The company cannot accept responsibility for any loss or damage arising from the use of this email or attachment."
9 years, 10 months