Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

With WSO2 API Manager, you can maintain a production and a sandbox endpoint for a given API. The production endpoint is the actual location of the API, whereas the sandbox endpoint points to its testing/pre-production environment. When you publish an API using the API Publisher, it gets deployed on the API Gateway. By default, there's a single Gateway instance (deployed either externally or embedded within the publisher). This Gateway instance supports both production and sandbox token types. When an API request comes to the API Gateway, it checks whether the requesting token is of type PRODUCTION or SANDBOX and forwards the request to the appropriate endpoint.

The diagram below depicts the default scenarios.

Figure: Both production and testing API requests are handled through a single gateway (default scenario)

The above API Gateway is known as a Hybrid API Gateway since it passes through both production and sandbox traffic. Instead of having the above approach, it is also possible to publish an API to two different API Gateways. One which will only pass through production traffic and the other which will only pass through sandbox traffic.

Using this approach, the Production API Gateway will only pass through requests which are made using 'PRODUCTION' type tokens and the Sandbox API Gateway will only pass through requests which are made using 'SANDBOX' type tokens. If an invalid token the is received on any of the two Gateways, it will return an error response to the requesting client saying invalid token type.

The <APIGateway> section of the api-manager.xml file contains details of how to configure the API Publisher to publish APIs to different Gateways. Visit this section of the API Manager documentation to see details of the <APIGateway> configuration and a sample configuration of an API Publisher which has 3 Gateways configured.

 

  • No labels