Skip to main content

API Gateway Quickstart

Let's put a gateway over this sample e-commerce API at with a Zuplo gateway and add rate limiting. Quickly take a look at the API by opening this URL in your browser:

Before we start, create a new project in

1/ Routes Setup

Open the Routes file and add a new route. Set the version to be v1 and the path of the new route to be /products/:productId.


2/ Rewrite Handler

Set the mode of the Request Handler to be URL Rewrite and the rewrite path to be${params.productId}. Notice that this appends the productId token to the outbound URL.


3/ Rate Limiting

Expand the Policies section and click the Add Policy button under request. Search for and click the Rate Limiting policy.

Rate Limiting

Accept the default configuration. Note how it's set to allow only 2 requests every 20s for a given IP address.

4/ Test Rate Limiting

Invoke your API using the Test Console. Click on the lightning tab and select the first file. Change the path to /v1/products/10000 and hit Test.


Try quickly testing it a few more time to see the rate limiter kick in - you'll get a 429 response, "Too many requests".

Congratulations, you set up a gateway!

Related Docs

Next Steps