Throttling configuration controls how your API handles traffic spikes by setting three parameters: throttling mode, throttling value, and throttling response.
-
Throttling mode
Disable: No limit on API calls.
Block: Requests that exceed the throttling threshold are blocked.
Throttling value: The maximum number of requests allowed per second. When the throttling mode is Block and requests exceed this value, they are throttled.
-
Throttling response: The default throttling response is
{"resultStatus":1002,"tips":"Too many customers, please wait"}To customize the response, use the following format:
{ "result": "==This is the custom response content. Enter==", "tips": "ok", "resultStatus": 1000 }The response fields are:
result: Custom response data in JSON format. The client processes this field only whenresultStatusis1000.tips: Custom throttling message shown to the user whenresultStatusis1002.resultStatus: Result code returned for throttling. For more information, see Gateway result codes.