Creating, Editing and Deleting Environments
On the Environments screen, you can set up new environments to deploy your APIs to.
Your Manager comes with a default environment configured. If you want to create a new environment, you must first register a new host for your environment on the Inbound Address page. You can use the same host for multiple environments, complementing the address of each environment with a unique Inbound URL, following the instructions of this page. Then, all your environments will have their own URL.
|
Creating an environment
You can set up a new environment by clicking the + on the bottom right corner of the Environments page.
There are two distinct sections to be filled out: the required data fields and the environment variables area.
Required fields
You must fill out the required fields, which comprise basic information and visualisation and deployment permissions.
Basic information
-
Name: name that identifies the environment.
-
Description: description that helps to identify the environment.
-
Host + Inbound URL: they comprise the URL that will represent the environment and receive requests made to the APIs deployed to it.
-
The Host field is required; you must select a domain registered on the Inbound Address screen.
-
When you select a host, you may complement the address in the Inbound URL field, which is optional. The URL will be displayed on the field for you to complete it (see the image below).
You don’t need to complement the host with an inbound URL. However, note that each environment must have a unique URL. Since it’s possible to use the same host for multiple environments, you will need to add a unique inbound URL to all environments that share the same host. The security type that is displayed on the list of existing environments (either none, TLS or mTLS) isn’t configured on the Environments screen, but on Inbound Address. That’s where you can configure, then, if the URL will contain http://
orhttps://
.
-
-
Gateway Pool: field to select which gateway pool in your contracted plan will attend the environment.
You can always talk to your Business Partner if you want to contract more gateway pools. Once the gateway pool of an environment has been selected, it is not possible to edit that gateway pool.
Permissions
The Environment Deployment Permission field is related to the permission to deploy APIs to the environment. The Environment Trace Visibility field, in turn, allows restricting visibility access to Trace (that contains the list of calls to the APIs deployed to the environment at hand).
The visualisation constraints managed here are applied both to General Trace (which refers to all APIs) and API Trace (referring to a specific API and accessed via API card). |
You can read more about visibility rules for Manager objects aqui. |
For both fields, these are the permission options:
-
Organization: it will allow access to all the company’s users.
-
Teams: it will allows access to the team selected. Click here to learn more about creating teams.
-
Only me: it will allow access only to the user who created the environment.
Environment Variables
Environment variables are variables with unique values within a specific environment. They are used as extra configuration for each environment, allowing customising requests so as to easily alternate between different contexts. They are not required, but they make the process of designing and managing APIs easier.
The API Manager allows creating environment variables that can be used at several points of our platform such as the Target or Timeout at the API Destination, when enablig a Connector or in many different Interceptors (see the table below).
List of interceptors that allow the use of environment variables:
Time allowed |
XML Threat protection |
Service mashup |
Query param |
To register environment variables, you must create a variables map or import an existing one from another environment.
To add a map, click the ADD MAP button. A screen like the image below will pop up. You must insert a name to the map and may add a description.
Now you can create environment variables, as a key-value pair in which both are strings.
You can also add a certificate, corresponding to the communication between the gateway and the backend, to be applied when the environment variable is used. To do that, click the icon. A modal window (see image below) will open for you to select the certificate, which must have been registered on the Certificates screen.
To import a map from another environment, click the IMPORT MAP button. When you start typing the environment name, the system will load the necessary information. Then, select the desired map and click on IMPORT MAP.
The environment variables will be loaded. You can view them by clicking the icon to extend the tab next to the map’s name. You can edit or delete the variables by clicking the respective icons ( or ).
To add more variables, click the icon and, when the tab opens, click the + icon. On this same tab, you can click to edit the name and description of the map () or delete it altogether ().
Example of use
As we mentioned before, an environment variable is a key-value pair in which both are strings.
In the example below, two variables were created: one named destination
, with a valid address, and one named rateLimit
, with value 2
.
The environment variable $destination
can be used, for example, as an API endpoint.
Then, when a request is made to that API, the gateway will direct the call to the address informed.
To set this up, you only need to reference this environment variable as the API’s target destination, as shown in the image below.
The Target Destination of an API is found on the Flows section of an API’s editing or creating process, by clicking the button on the diagram representing the request and response flows. |
All environment variables, when referenced in APIs or interceptors, must be preceded by the $ symbol.
|
In the image below, we have an example of the $rateLimit
environment variable being used in the Rate Limit interceptor.
In this scenario, when a request is made to the API, the gateway will replace the number of calls with the value configured in the variable (in this case, the value 2
).
Editing an environment
The environment editing button is found on the list of existing environments, in the ACTIONS column.
To edit the data, click the icon and you’ll be redirected to the editing screen.
Deleting an environment
To delete an environment, click the icon in the ACTIONS column of the existing environments list and confirm the action by clicking the CONFIRM button.
If the environment you wish to delete has active API deployments, you will not be able to delete the environment. To do so, you must first disable the deployments. |
Share your suggestions with us!
Click here and then [+ Submit idea]