API Testing with Postman: Exporting Collection for Custom Connector

Removing Elements from Collection for Custom Connector Export

Question

You test your API using the Postman.

You create a collection and need to export it for creating a custom connector.

What are two elements that you need to remove from your collection before the export?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E. F.

Correct Answers: B and E

A custom connector is an API wrapper around the REST API.

You can create such a wrapper for Azure Functions, Azure Web Apps, Azure API apps.

When you create your application using one of these services, you need to describe the API's operations before exporting your application's APIs.

There are three approaches to how to create the API definitions: Using a blank custom connector.

Using an Open API definition.

Using a Postman Collection.

You can create a custom connector by importing the Postman collection JSON file.

After you test your APIs using the Postman, you can export the collection.

Postman creates the JSON file with the descriptions of your APIs.

But before exporting the collection, you need to remove or disable two elements: Authorization and Content-type.

You can disable Authorization from the Authorization tab (Number 1) on the central Postman panel by selecting the “No Auth” option from the Type drop-down (Number 2)

You need to save your changes using the Save button (Number 3).

Power Platform / {{webapiurl}}/EntityDefinitions(LogicalName='account')/Attributes(LogicalName='emailaddress1')

GET vy {{webapiurl}}/EntityDefinitions(LogicalName='account')/Attributes(LogicalName='emailaddress1')

Headers (13) Body @ Pre-request Script Tests Settings

Current Token
OAuth 2.0 a
This access token is only available to you. Sync t!
The authorization data will be automa_ Inherit auth from parent Access Token

the request. Learn more about autho

Add authorization data to

API Key
Bearer Token Header Prefix ©
Basic Auth
i Y Configure New Token
Digest Auth
OAuth 1.0 Token Name
OAuth 2.0

Grant Type
Hawk Authentication

AWS Signature Callback URL ©

NTLM Authentication [Beta]

Akamai EdgeGrid Auth URL ©

Client ID @

Scope ©

State @

Client Authentication

Clear cookies ©

Get New Access Token

he token to let collaborators on this request use it.

Available Tokens

eyJOeXAIOIJKVIQiILCJhbGciOiJSUZIINi

Bearer

CBPostman

Implicit

{{callback}}

O Authorize using browser

{{authurl}}

{{clientid}}

e.g. read:org

State

Send as Basic Auth header

Next, on the Headers tab (Number 1), you can uncheck the box in front of the Content-Type Key (Number 2) and save your changes (Number 3).

Power Platform / {{webapiurl}}/EntityDefinitions(LogicalName='account’)/Attributes(LogicalName='emailaddress1') 000 GC #8 A

GET v {{webapiurl}}/EntityDefinitians(LogicalName='account’)/Attributes(LogicalName='emailaddress1') A

Headers (12)

KEY VALUE DESCRIPTION eco §=6 Bulk Edit Presets v

Params Authorization Body @ Pre-request Script Tests Settings Cookies >

Headers © 10 hidden

application/json

ka Prefer odata.include-annotations="*"

Key Value Description

After these operations, you can export your collection from the Postman and import the JSON file as a custom connector definition.

All other options are incorrect.

For more information about preparing and using the Postman collections for the custom connectors, please visit the below URLs:

When exporting a collection from Postman to create a custom connector, there are two elements that should be removed:

  1. Authorization: If the collection contains any authorization information, such as API keys or access tokens, these should be removed before exporting. This is because the custom connector will require its own authorization settings and it's not recommended to use the same authorization settings across different environments.

  2. Tests: Tests are used to validate the response from the API, and are typically used during the development phase. However, tests should be removed before exporting the collection because custom connectors are not designed to execute tests. The tests will not function in the custom connector environment and can cause errors if included.

The other elements listed (Body, Content-type, Postman-Token, and Params) do not need to be removed before exporting the collection. However, it is important to ensure that these elements are configured correctly before exporting the collection to ensure that the custom connector functions as intended.

  • Body: This refers to the data being sent to the API in the request. It should be configured correctly to match the API's requirements.
  • Content-type: This specifies the format of the data being sent in the request, such as JSON or XML. It should be set to match the API's requirements.
  • Postman-Token: This is a token generated by Postman for each request. It is not necessary to remove this element, but it should not be relied upon for authentication or authorization.
  • Params: These are the parameters sent with the request, such as query parameters or path parameters. They should be configured correctly to match the API's requirements.