Build a new connector with Postman
1. Overview
In this guide, you will learn how to build custom connectors for Digital Assistant using Postman, a tool for API development.
Postman allows you to make HTTP requests to resources online, and additionally execute scripts using the response data. By utilising Universal Card Templates in combination with the response from a web API, you can create Cards to display data from any application with an exposed API.
Examples
A sample collection of requests using Universal Card Templates (including example data and scripts) is available for download. To download the sample collection, click the link below.
JavaScript and Postman Sandbox support
Postman connectors use the adenin components sandbox and the Postman sandbox as an environment to run scripts.
The adenin components sandbox supports ECMA-262 5.1. Javascript ES6 features are not supported. The following npm modules are also supported:
Additionally, Postman connectors can utilise some of the built-in Postman Sandbox API functions. The following functions are supported:
- pm.env.get
- pm.env.set
- pm.response.json
- pm.response.text
- pm.sendRequest (object based requests are supported, but only with raw JSON in the request body. mode and raw parameters are ignored)
The Postman Sandbox API reference provides a full reference of available built-in library modules and Postman functions.