Let’s see what steps are required to import a Postman Collection to the API Browser.
Open an Integration Project.
Open the API Browser through View > Data Service > API Browser.
Click on the Import API option on the API Browser.
This will open the Import API window.
Select Postman collection from the API Import Source drop-down.
Browse and provide the path to the Postman Collection and click OK.
If there is already a Shared Connection available, then we can re-utilize it, instead of auto-generating a new one, by checking the Use Existing Connection checkbox.
Once the Postman Collection is successfully imported, it will populate the API Browser with the available endpoints.
Note: It is recommended by Postman to export the collections in v2.1 format files. Therefore, Astera restricts the user to import only a v2.1 Postman Collection.
The Centerprise API file (.capi) and Shared Connection files will automatically generate and be saved in their respective folders.
Now, drag-and-drop any endpoint onto a logic designing artefact i.e., a Dataflow to consume.
To import a Postman Collection to the API Browser successfully, we must follow certain conventions:
The Postman collection must include a variable, namely baseUrl. (This variable is not case sensitive)
Note: A collection in which the baseUrl variable contains a special character(s) will not be imported.
All other variables, except for the baseUrl, will be discarded.
During the import, the baseUrl variable defined in all the endpoints will be replaced with the Base Url text box value in the Shared Connection.
This means that the Shared Connection’s Base Url will be populated with the baseUrl variable’s Current Value that is defined under the Variable section in the collection.
All valid Postman Collections will be imported with pre-configured Shared Connections. These Shared Connections will have the same Authentication Type selected as in the collections i.e., API Key, Auth Code, Client Credentials, etc.
Note: Confidential data such as credentials are imported for security and protection.
Upon importing a Postman Collection, each endpoint’s configuration i.e., methods, resources, parameters, and request/response payloads will also be preserved.
All parameters with their respective default values are populated in the API Client’s Parameter window.
Note: Sensitive data such as the URI parameter value is not preserved for security.
The input and output layouts/payload are structured in the respective Input and Output Layout windows. Additionally, the sample text bodies used to generate the layouts are preserved in the Sample JSON Text window.