Cloud Blog

Swapping version and context in API URLs

By default, APIs published in WSO2 API Cloud get URLs like http://{base-gateway-URL}/{API context}/{API version}/{API resources and parameters}. For example, if the custom URL that you assigned to your gateway is, you might get something like

But what if you want to place the version number first and have something like instead? This is trivial too. Simply type {version}/stats (or whatever your API context is) instead of just stats as the context on the first step of API creation:

And you can remove the version number altogether by selecting the Make this the Default Version checkbox on the 3rd step of API creation:

WSO2 API Cloud is a powerful API management platform that allows you to easily create the exact API program you need!

Leave a Reply

Your email address will not be published. Required fields are marked *


Recent Posts

Most Popular Posts

Twitter Facebook LinkedIn