Postman is a toolset for API testing. It is a development environment that lets you create, test, manage, and publish API documentation.
Working with requests in Postman consists of the following general stages:
- Adding a request
- Setting up the request
- Executing the request
- Saving the request
A collection of requests lets you execute several requests consecutively. Any collection of requests to Creatio must include a POST request to AuthService.svc and a user request for working with data. Using collections facilitates faster testing of large sets of requests.
Working with collections of requests in Postman consists of the following general stages:
- Adding a collection of requests
- Adding requests to the collection
- Setting up variables for the request collection
- Executing the collection of requests
There are two ways of adding a request in Postman:
- Open the Create New tab, then in the Building blocks click New –> Request.
- In the dropdown menu of the New button, click Request.
Populate the fields in the new request window:
|Request name||The name of the new request.|
|Request description (Optional)||Additional information about the request (optional).|
|Search for a collection or folder||Search for an earlier created collection of requests, or create a new one.|
Populate the fields and click Save. The button becomes active only after the Search for a collection or folder field is populated.
To set up the request:
- Select the request method.
- Enter the request string.
- Set the data format of the request. Go to the Body tab, select the “raw” option and JSON type.
- Populate the request body for POST and PATCH methods.
- Go to the Headers tab and set the headers.
Accept: application/json Content-Type: application/json; charset=utf-8 ForceUseSession: true
To execute a request, click Send.
To save a request, click Save.
We recommend using Postman for testing queries when developing integrations with Creatio via OData.
There are two ways of adding a collection of requests in Postman:
- Click New –> Collection in the Building blocks of the Create new tab.
- In the dropdown menu of the New button, click Collection.
- On the Collections tab, click + New Collection.
Populate the fields in the new collection window:
|Name||The name of the collection.|
|Description||The description of the collection.|
There are two ways of adding a request to a collection in Postman:
- Drag and drop an existing request to the collection.
- Right-click the name of an earlier created collection, then click Add Request.
Collections enable setting up common variables and parameters for all requests that it contains. To set the collection variables:
- Right-click an earlier created collection.
- Click Edit, then go to the Variables tab.
- Create the following variables for the collection:
Variable name Description BaseURI Creatio application URL. UserName Creatio application user name. UserPassword Creatio application user password. BPMCSRF CSRF protection token. CollectionName Object collection (database table) name.
Variable values in the Initial value and Current value must be duplicated.
To execute a collection of requests:
- Click next to the collection name.
- Click Run.
- In the Run order block, select requests to run and set their order (1).
- Select the Save responses checkbox (2).
- Click Run (3).
Getting data of the request structure elements and the response:
- Click the request name.
- Click View –> Show Postman Console or press Alt+Ctrl+C on the keyboard.
Select the needed item.