ProcessMIX User Guide
Categories

REST Connectors builder

Updated on March 23, 2023
Print

The REST (Representational State Transfer) connector builder provides the ability to create a codeless connection to any external systems; services via API for further use in flows. Within one base domain, there can be several services with individual path and request parameters. Each service can contain its own cookies and headers.

To create a new REST Connector, select the Connector icon on the Project Explorer panel – left end panel. Make sure you are in the Connector entity. Now create a REST Connector by clicking on the icon on the Explorer panel and selecting REST Connector. To create a connector in a folder, you need to select the desired folder and then click on the icon. In the pop-up window, enter the REST Connector name and upload a SWAGGER file or enter a URL to it and click the CREATE button.

Note:

NOTE: You cannot use file upload and the link to swagger at the same time.

Note:

NOTE: The connector’s name should be longer than 1 symbol and shorter than 100. It can contain letters (Latin a-z A-Z), numbers 0-9, $, and underscores. It should begin from a letter or underscore character.

Also, to create the REST service from scratch. In the pop-up window, enter the REST Connector name and click the CREATE button.

Your first REST connector has been created.

How to set up the REST Connector?

If the SWAGGER file was imported with a specific set of services, you will be able to edit those services. You can test these services and create new services in the REST Connector.

Otherwise, you can create your own set of services and configure them manually.

To add a new Connector service. Click on the icon. In the pop-up window, enter the Connector service name and click on the CREATE button.

To filter Connector services to find the necessary services. Click on the icon. You will see a field in which you can enter the name of the element that you need to find and enter the requested value. After that, the results of the match will be presented in the general list.

Note:

NOTE: The connector’s service name should be longer than 1 symbol and shorter than 250. It can contain letters (Latin a-z A-Z), numbers 0-9, $, and underscores. It should begin with a letter or underscore character.

To add a Description to the REST Connector. Click on the description section and enter the value.

Preservation occurs when starting/switching work with another entity or closing a tab.

How to configure the connector service from scratch?

To configure the REST Connector, you must enter the following parameters:

  • URL
  • Method
    • GET
    • POST
    • PUT
    • DELETE
    • PATCH
    • OPTIONS
    • HEAD
  • Request (for POST, DELETE, PATCH, PUT methods). This field is empty by default and requires assigning structures to use it.
  • Response (available for POST, GET, DELETE, PATCH, OPTIONS methods). By default, a custom EmptyResponse structure is assigned. You need to use a structure that matches the expected response of the method.

Supported data types for request and response

  1. Boolean — value “true” or “false”
  2. String — text, for example, “Peter Peterson”
  3. Integer — number, for example, “22”
  4. Float — floating-point or decimal number, for example, “0.1234”
  5. Date — specify the date value in the format yyyy-mm-dd, for example ‘’1993-05-31’’.
  6. Custom — any arbitrary structures that can be created in the Structure builder

Also, there are some optional parameters:

  • path parameters
  • request parameters

They are generated from the URL or can be created manually.

For the system to recognize them as parameters from a URL, you must put the keys in curly brackets {..}, after which the parameters will become available in the corresponding section and appear in the testing block.

To add new request and path parameters manually.

Click on the icon on the central part near the request or path parameters section then click on the data type and select the necessary data type. After that, they will appear both in the URL and in the testing block.

Supported data types for request and path parameters:

  1. Boolean — value “true” or “false”
  2. String — text, for example, “Peter Petenson”
  3. Integer — number, for example, “22”
  4. Float — floating-point or decimal number, for example, “0.1234” 

To filter parameters to find the necessary parameters.

Click on the icon. Enter the name of the element in the field that you need to find and enter the requested value. After that, the results of the match will be presented in the list.

How to test the connector service?

Connector builder has built-in functionality that allows the user to test an imported or created connector’s services. You can test the call to check if it works and see the results of it. To change its settings in case of incorrect service operation.

To test the service, you need to go to the Request section, if the service method requires it, and add the request parameters values of the structure to the JSON.

If the connector has request and path parameters and they are necessary to get the required results, then they should also be set in the corresponding sections.

Note:

NOTE: Make sure that the entered values match the parameter types.

To add Cookies and Headers. Click on the icon on the Test Connector Service and enter the key and value in a text format. You can also delete this data by clicking the right mouse button.
Where the key is the cookie name and the value is the cookie value.
Where the key is the header name and the value is the header value.

After filling in all the required values, the TEST button will become available, by clicking on it, the system will send a request to the specified endpoint and you will see the processing result in the Response section.

Additional operations with REST Connector

Select Rest Connector on the Project Explorer panel — left end panel. By clicking on the right mouse button, a context menu opens and makes a number of operations available.

Let’s see what operations are possible here:

  1. Edit or simply clicking on the name of the connector — allows you to open the REST Connector.
  2. Copy — allows you to copy the connector to transfer it later.
  3. Clone — allows you to create a clone of the connector. The cloned connector will have the same name as the Name of the parent connector + Clone(n).
  4. Cut — allows you to cut connectors for later transfer.
  5. Paste — allows you to paste a connector. It is not available unless you have previously used the Copy or Cut options.
  6. Rename — allows you to rename the connector.
  7. Delete — allows you to delete the connector.

Additional operations with Connector services

Select the Service on the connector services section. By clicking the right mouse button, a context menu opens and makes a number of operations available.

Let’s see what operations are possible here:

  1. Add — allows you to create the new service.
  2. Copy — allows you to copy the service to transfer it later.
  3. Clone — allows you to create a clone of the service. The cloned service will have the same name as the Name of the parent service + Clone(n).
  4. Paste — allows you to paste service. It is not available unless you have previously used the Copy or Cut options.
  5. Rename — allows you to rename the service.
  6. Delete — allows you to delete the service.

Additional operations with parameters

Select parameter on the connector service settings section. By clicking the right mouse button, a context menu opens and makes a number of operations available.

Let’s see what operations are possible here:

  1. Add — allows you to add a new parameter.
  2. Copy — allows you to copy the parameter to transfer it later.
  3. Clone — allows you to create a clone of the parameter. The cloned parameter will have the same name as the Name of the parent parameter + Clone(n).
  4. Paste — allows you to paste parameters. It is not available unless you have previously used the Copy or Cut options.
  5. Delete — allows you to delete the parameter.