# Type 3 – Import Postman API Collections

Let’s see what steps are required to import a Postman Collection to the *API Browser*.

1. Open an Integration Project.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F3dB2S8UOArAktuJB3ORN%2F11-Postman.PNG?alt=media\&token=77e9dbf8-b655-4f1d-a3a5-4b732b8e0fe6)

2. Open the *API Browser* through *View* > *Data Service* > *API Browser*.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F2ahfLsjUWJg0xkBl457D%2F12-Browser.PNG?alt=media\&token=e8e60829-574e-4252-8c42-13eec09d8caa)

3. Click on the *Import API* option on the *API Browser*.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FnWRP2wxqXXUrGaE7cfdY%2F13-Import.PNG?alt=media\&token=d9a32eb0-c62d-4075-9406-6d0718202f3c)

This will open the *Import API* window.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FCXNrKKRBH98R0M2Gmnx0%2F14-Custom.PNG?alt=media\&token=c8c130e0-d2d1-4871-ab5f-7e4feb2a23a8)

4. Select *Postman collection* from the *API Import Source* drop-down.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2Ff72oPX5gIXT7FsChLgzS%2F23-PostMan.PNG?alt=media\&token=be19e747-1608-4f25-bd3f-f3cdc23d4be0)

5. Browse and provide the path to the *Postman Collection* and click *OK*.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F3YexVs6m5ShBNUxGhoA5%2F24-Browse.PNG?alt=media\&token=e3beee52-1f69-4c72-a6aa-abb1f028ebcd)

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.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F9lpdNUiO2kKfBsHrro4g%2F25-Fruit.PNG?alt=media\&token=0d2f8c59-8351-4aa5-aab0-0937d9738c90)

{% hint style="info" %}
**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.
{% endhint %}

The Centerprise API file (.capi) and Shared Connection files will automatically generate and be saved in their respective folders.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FrnJRYmOkMbK2EB8ssRKv%2F26-Capi.PNG?alt=media\&token=b111c38c-3cb5-4999-8b6a-8478e49bf9e0)

6. Now, drag-and-drop any endpoint onto a logic designing artefact i.e., a Dataflow to consume.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FAZEAwz0Ng24lQQtYPdWh%2F27-Endpoint.PNG?alt=media\&token=b9d2dac1-7bd5-4c0b-b344-64ad878065dc)

### Postman Collection Format

#### Variables Convention

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)

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FT3IVGDWvy5qE3WkNAYoF%2F28-Postman-Coll.PNG?alt=media\&token=abaea8bf-db4d-4395-ba9e-01f99edf24c4)

{% hint style="info" %}
**Note:** A collection in which the *baseUrl* variable contains a special character(s) will not be imported.
{% endhint %}

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.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FY2t0POBV0wdVU5X2Re0f%2F29-Import.PNG?alt=media\&token=8780b85e-cb34-4c35-81e1-fcc421200215)

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.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F7ixgpd5s47EX6ZLAHVoZ%2F30-Postman.PNG?alt=media\&token=1647758d-507d-414d-8afb-32fdb06f19a1)

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FgUHhdPNDNX4jzbQkMALQ%2F31-Connection.PNG?alt=media\&token=4f091c0f-34bd-49e1-9f2c-72a592d23f17)

### Preservation of Authentication Information

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.

{% hint style="info" %}
**Note:** Confidential data such as credentials are imported for security and protection.
{% endhint %}

#### Example of an API Key Security Type

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FOpR8eFF6K9oItYDhmpZN%2F32-API-Key.PNG?alt=media\&token=dbcbc734-b18c-474d-88e2-90b8b34d0963)

#### Example of an OAuth 2.0 Security Type

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FH17AcPmXNU8dZQzzn0oF%2F33-OAuth.PNG?alt=media\&token=8fee6871-e84a-4eea-aadf-df2138186a9a)

### Preservation of Endpoint’s Configuration

Upon importing a Postman Collection, each endpoint’s configuration i.e., methods, resources, parameters, and request/response payloads will also be preserved.

#### HTTP Method and Resource

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FMXLOqvvlhrKugoRWYgeg%2F34-Method-Resource.PNG?alt=media\&token=be02f766-d252-4f84-9d81-5a85af910fa3)

#### Parameter

All parameters with their respective default values are populated in the API Client’s Parameter window.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FCy4BFWeSe7YaNrwL9pbb%2F35-Parameter.PNG?alt=media\&token=75ef2d07-c804-4561-ad45-2b0e8700bad9)

{% hint style="info" %}
**Note:** Sensitive data such as the URI parameter value is not preserved for security.
{% endhint %}

#### Payload

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.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FUoEmaeLBwrYeq7NCecfC%2F36-Payload.PNG?alt=media\&token=e152d030-9fa4-492d-9cae-313f8d039b56)
