Environment Settings
In eZintegrations, environment settings are used to store and manage dynamic values that can be reused across multiple requests and collections. These settings are helpful for streamlining your API testing and ensuring consistency in your requests. Environment settings can be categorized into different types, such as Parameters, Authorization, and Endpoint URL, based on their use. Here are some examples:
Parameters Environment settings:
Example: Let's say you have an environment variable called apiKey, which stores an API key. You can use this variable in your requests like this:
Request URL: https://api.example.com/data?apikey={{apiKey}}
Request Headers: You can set a header like Authorization: Bearer {{apiKey}}
In this example, the {{apiKey}} variable is used to pass the API key in the URL and as a header value for authentication.
Authorization Environment settings:
Example: You can store credentials for Basic Authentication in environment settings. For instance, you might have a variable called basicAuth with the value Base64Encode(username:password). You can use it as follows:
In the request, you set the Authorization header to Basic {{basicAuth}}.
This approach allows you to keep sensitive information secure and make it easy to update credentials if they change.
Endpoint URL Environment settings:
Example: Suppose you have an environment variable called baseURL, which represents the base URL for your API. You can use it in requests as follows:
Request URL: {{baseURL}}/endpoint
By setting the baseURL variable, you can easily switch between different environments (e.g., development, staging, production) without modifying all your requests.
Here's how you can create and manage environment settings in eZintegrations:
- Open eZintegrations and navigate to Click Add Integration Bridge and select a API from Data Source and click on the + button to add "Environment Settings".
- Create a new environment or select an existing one.
- Add settings with their names and values, and categorize them as needed (e.g., Parameters, Authorization, Endpoint URL). In your requests, you can reference these settings using double curly braces, like {{variableName}}.
By using environment settings in eZintegrations, you can make your API testing more efficient, maintainable, and adaptable to different testing scenarios and environments.
You can create Environment settings in Data Source API, Operations API, Data Target APIs and Marketplace APIs
All your Environment Settings will be saved only when you have saved the Integration Bridge, else you will loose the Environment Settings.
A newly created Environment Settings will be retained till the time the login session is alive.