Data as a Service

Not applicable

The requirement is to limit the amount of data being pulled out of back end server per day i.e. useing data as a service.

https://community.apigee.com/questions/54883/using-data-as-service-limit-the-amount-of-data-bei-1.ht...

I have tried the above solution as suggested by @Dino . But it's not working. Actually it's the no of hits it is keeping count of not the amount of data being transferred from server.

Moreover There are few things that need clarification.

<MessageWeight ref="size_in_bytes_of_response"/> 

The purpose of this statement is not clear. Moreover from where will be the value of size_in_bytes_of_response fetched? Can we also specify the unit in KB or GB.

0 1 57
1 REPLY 1

You wrote:

(MessageWeight) The purpose of this statement is not clear.

You have seen the documentation for the Quota policy, right? Have you read the part that explains the MessageWeight element? What part is unclear?

The doc states:

A value representing MessageWeight must be specified by a flow variable, and can be extracted from HTTP headers, query parameters, an XML or JSON request payload, or any other flow variable.

and you asked:

from where will be the value of size_in_bytes_of_response fetched?

I don't know, where can you get the size of the response? Maybe ... from the content-lengthheader? Or... maybe.... if you are computing the response, you simply measure it within a JS policy?

it's the no of hits it is keeping count of not the amount of data being transferred from server.

This will continue to happen until you get the MessageWeight to reflect some real quantity in your system.