When consuming REST APIs there are some configurations that can be set at runtime in the management console of each environment. This allows you to easily customize your runtime settings when deploying your application in different environments.

For example, you can use a URL of a REST API with test data for Development and Quality Assurance environments. However, in the Production environment, you use a URL of a REST API with real data. This way, in the code, you use the REST API always in same way, and its URL changes with what is configured in the environment.

To configure runtime settings, simply edit the module in the environment management console (Service Center), select the Web Services tab, and edit the REST API.

The Effective URL

When a REST API is created you define a URL for it. This is the default URL. To use a different URL in a specific environment, simply go to the environment console, edit the REST API, and set an effective URL for it.

For example, in an enterprise environment, you may have a URL for development and test purposes and another one in production.

Effective Authentication

A REST API may be created with credentials for basic authentication. Those are the default credentials. To use different credentials in a specific environment, simply go to the environment console, edit the REST API, and set an effective username and effective password.

For example, in an enterprise environment, you may have different credentials for development and test, and another for production.

See an example of a REST API with basic authentication.

See Also

Troubleshooting REST APIs