Overriding Endpoint Information - API Manager 2.6.0 - WSO2 Documentation

All docs This doc
||
Skip to end of metadata
Go to start of metadata

This documentation is for the API Microgateway component that is coupled with WSO2 API Manager 2.6.0.
View the documentation for the latest release - WSO2 API Microgateway 3.0.1.

The backend URLs and credentials for endpoints can be provided for each Gateway node as system properties. Following are the supported functionalities:

Override endpoints

To override the production endpoint of an API (e.g., TestAPI v1), provide the following system variable at server startup,

bash gateway -e TestAPI.v1.prod.endpoint.0="http://wso2.com"

For the sandbox endpoint, provide the following system variable at server startup,

bash gateway -e TestAPI.v1.sand.endpoint.0="http://wso2.com"

If there is more than one endpoint (e.g. load balance endpoint), use the following method to define each endpoint:

bash gateway -e TestAPI.v1.prod.endpoint.0="http://wso2.com" -e TestAPI.v1.prod.endpoint.1="http://support.wso2.com"

To set the endpoint using system properties, use the following method (replace . with _ in a Linux environment):

export TestAPI_v1_prod_endpoint_0="http://wso2.com"

Define backend basic auth credentials

If the backend endpoint is protected with basic auth, provide credentials related to that endpoint. Use the following system variables to define them:

bash gateway -e TestAPI.v1.prod.basic.username="admin" -e TestAPI.v1.basic.password="admin"

If a username is not defined, the username defined in the API (during API implementation) is used. To set the credentials using system properties, use the following method (replace . with _ in a Linux environment):

export TestAPI_v1_prod_basic_username="admin"
export TestAPI_v1_prod_basic_password="admin"
  • No labels