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

How to set isHTTPStatusTooManyRequestEnabled to return 429 http response

Not applicable

Hi All

I am using a Quota policy that return 500 http error. a want to change this response to 429 Too Many Requests http response.

On the documentation page it says that I need to set

features.isHTTPStatusTooManyRequestEnabled property to true

Does anyone know how to do this ?

Note:

We have Apigee Edge installed on local environment

The documentation page :

http://apigee.com/docs/api-services/content/comparing-quota-spike-arrest-and-concurrent-rate-limit-p...

Thanks for your help

Solved Solved
0 15 1,653
1 ACCEPTED SOLUTION

adas
New Member

Sorry, I assumed you were talking about the Apigee Edge on cloud version. Here' what you need to do to set the flag:

PUT http://{mgmtIp}:{mgmtPort)/v1/organizations/apigee-org
Content-Type: application/xml
Authorization: Basic {sysadmin}


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Organization type="paid" name="apigee-org">
    <DisplayName>apigee-org</DisplayName>
    <Properties>
        <Property name="features.isHTTPStatusTooManyRequestEnabled">true</Property>
    </Properties>
</Organization>

Couple of things about this api:

- You need to run this as the sysadmin, orgadmin may not not rights to change some of these properties

- If you have any other <Property> set in the org level, make sure you pass them in the org UPDATE call. The api would overwrite the existing properties with the <Property> list passed in the call.

Hope this helps.

View solution in original post

15 REPLIES 15