---
title: REST API
description: Create and configure connectors in the old canvas
documentId: ipaas-legacy-connectors-rest-api
locale: en-US
---

## Creating a connector

To create a REST API connector, follow the steps below:

<Steps>
<Step>
**Access the Connector Manager screen**
</Step>
<Step>
**Click + NEW CONNECTOR**
</Step>
<Step>
Select the **REST API** connector card
</Step>
<Step>
**Import a file with the Open API 3.0.0 specification**

* In the modal window that opens, click **SELECT FILE** to locate the file.

* After locating the file, click **IMPORT**.

* When importing the file, the system will check for structure errors and compliance with the supported version. 
After validation, the connector configuration screen will open, with all fields automatically filled in with the imported data.

<Callout type="note" title="NOTE">
Only files with the extensions ".json", ".yaml" and ".yml" are allowed to be imported.
</Callout>
</Step>
<Step>
**Edit the fields with connector information** (optional)

* **Name**: connector name.
* **Version**: connector version.
* **Description**: connector description.
* **Add icon**: add an icon to represent the connector.
</Step>
<Step>
**Select the routes**

* If you prefer, click **Select All** to select all available routes.

<Callout type="note" title="NOTE">
You can view the request and response of each selected route on the right side of the route list.
</Callout>
</Step>
<Step>
**Click CREATE**
</Step>
</Steps>

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/create_rest_api_connector_a07051695d.gif)

<Callout type="important" title="IMPORTANT">
It is **not** possible to edit a REST API connector. 
If you want to make changes, such as selecting a new route, you will need to create a new connector. 
For other modifications, update the specification in the import file.
</Callout>

## Configuring a connector

To use the connector you created in **Connector Manager** in an integration, you must configure it on the **Flow** screen. 
To do this, follow the steps below: 

### Add the connector to the canvas

<Steps>
<Step>
**Access the Integration Flows screen**
</Step>
<Step>
**Select the desired integration flow**

* If the integration flow that will use the connector already exists, select it and open the **Flow** screen. 
* If you want to use the connector in a new flow, click **+ NEW FLOW**.

<Callout type="note" title="NOTE">
Check out our tutorial on [how to create your first integration flow](/docs/integrations/ipaas-legacy-create-flow).
</Callout>
</Step>
<Step>
**Select the connector in the canvas editing menu**

* Click the ![hub icon with plus sign](https://creative-ball-51b3fc85c0.media.strapiapp.com/connectors_Icon_1f4432d891.png) icon in the left editing menu.
* Search for and select the connector you registered. 
You can use the search bar ![](https://creative-ball-51b3fc85c0.media.strapiapp.com/search_steps_icon_245a7221ea.png) to find it.
* Select the connector on the canvas and click the edit icon ![pencil icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/edit_icon_34464736ca.png) to open the configuration form.
* Make sure the connector is connected to the previous step and the step after it on the canvas.
</Step>
</Steps>

<Callout type="note" title="NOTE">
Each connector allows only one input connection and one output connection.
</Callout>

<Callout type="tip" title="TIP">
When selecting the connector on the canvas, you can:

* **Edit it** ![pencil icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/edit_icon_34464736ca.png).
* **Copy it** ![copy icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/copy_step_icon_fd3cbe733c.png).
If the connector form is already configured, the settings will be copied as well.
* **Delete it** ![trash icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/remove_Icon_486c52eeeb.png).
</Callout>

### Fill in the editing form 

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/connector_form_0e285926eb.png)

* **Name**: connector name.
Automatically loads the name you used during connector creation, but can be edited. 

* **Connector**: locked field that shows the connector name at the time of its creation. 

* **Route**: select the route (example: `GET/customer`) that the connector will use. 
If there are many, you can type the HTTP method or path to filter the results.

* **URL**: enter the URL that will make the request. 
If you have registered the URL in environment variables, you can click the icon on the right and select it.

* **Request Timeout**: enter the request timeout in milliseconds. 
By default, the value will be 3000 milliseconds and the maximum value is 300000 milliseconds.

  By clicking the **Properties** icon ![list icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/properties_icon_2c777edb35.png) to the right of the **URL** and **Request Timeout** fields, you can:

  - Select previously registered variables. 
  - Select input or output payloads from previous steps.
  - Create expressions using the Expression Builder.

  <Callout type="note" title="NOTE">
  Read more about [**Properties and Expression Builder**](/docs/integrations/ipaas-legacy-expression-builder).
  </Callout>

* **Security**: automatically enables the security type already configured in [Authorizations](/docs/integrations/ipaas-authorizations). 
If there is more than one type of security registered, the field will show a list with the options.
If the connector does not have any security type enabled, by default the field will display the **No Auth** option. 

* **Ignore Errors**: ignores errors during flow execution. 
By default, this button is disabled and you can enable it.
Check out details about its operation in the table below:

  | Enabled ![](https://creative-ball-51b3fc85c0.media.strapiapp.com/switch_b7a9c56956.png) | Disabled ![](https://creative-ball-51b3fc85c0.media.strapiapp.com/switch_off_460667d32c.png) |
  |--------------------------------------|-------------------------------------------|
  | Flow execution continues, even if there are errors in the process. | Execution will be stopped immediately. |
  | Logs show the step with error. | Logs show execution up to the step with error. |
  | Following steps will be executed. | No following steps will be executed. |

### Configure the tabs: Body, Header, Query and Path  

#### Body

To configure the request body, click **+ CREATE DATA MAPPING**.

There are two configuration options:

* [Data Mapping](#data-mapping) or 
* [Data Mapping with Full Body](#data-mapping-with-full-body)

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/body_connector_4b9ceae83d.png)

##### Data Mapping

Data mapping is fundamental for integrating different systems and applications, allowing the fluid exchange of information between them. 
It transforms data from one format to another, adjusting fields and types as needed.

Using the "FROM" and "TO" columns, you can map your data manually:

* **FROM**: indicates the data source, which includes previous steps and registered environment variables.

* **TO**: represents the data destination, which corresponds to the connector request body.

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/data_mapping_empty_fccc400bf8.png)

**1-to-1 data mapping**

<Steps>
<Step>
Select an attribute in the "FROM" column on the left.
</Step>
<Step>
Select an attribute from the "TO" column on the right.
</Step>
<Step>
Click **ADD MAPPING**.
</Step>
<Step>
Click **CONFIRM**.
</Step>
<Step>
You can repeat the steps above as many times as necessary.
</Step>
</Steps>

Once saved, you will be able to view the data mapping in the **Body** tab and the edit option will be enabled. 

See a demonstration in the GIF below:

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/data_mapping_1_to_1_0fde77306b.gif)

**2-to-1 or more data mapping**

For a 2-to-1 or more data mapping, you must use an expression.

To do this, before selecting the attributes in the "FROM" column, click on the concat function (the only available function) in the **EXPRESSION** section.
If you prefer, you can write the expression manually.

<Callout type="important" title="IMPORTANT">
You can only select one attribute from the "TO" column, and this attribute cannot be chosen more than once.
</Callout>

See a demonstrative GIF below: 

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/data_mapping_2_to_1_55262f8d4f.gif)

Now, see another example of data mapping: 

* Use of the concat function to map three attributes from the "FROM" column (`logradouro`, `município` and `UF`) to the `logradouro` attribute of the "TO" column.

* Mapping the `nome_social` attribute from the "FROM" column to the `nome` attribute of the "TO" column. 
For Each appears in front of the expression, as it is the source of the payload.

* Manual mapping of the city "São Paulo" to the `cidade` attribute of the "TO" column.

See the examples in the GIF below:

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/data_mapping_examples_1a8c63b5f7.gif)

**Data mapping fields**

You can view the data mapping in **DATA MAPPING FIELDS**.
Each row shows the input attribute (or expression) and the output attribute in the respective columns.

<Callout type="tip" title="TIP">
If the arrow between the "FROM" and "TO" columns is gray, this indicates that there is no associated expression. 
On the other hand, if the arrow is orange, it means that an expression was used.
</Callout>

To delete a row from the data mapping:

<Steps>
<Step>
Click the arrow between the "FROM" and "TO" columns to select the row.
</Step>
<Step>
Then click the ![trash icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/remove_Icon_486c52eeeb.png) next to the "DATA MAPPING FIELDS" section title.
</Step>
</Steps>

**Attribute structure**

Consider the data mapping example with the concat function: 

```
concat($.API_Brasil.Response.Payload.logradouro$.API_Brasil.Response.Payload.municipio$.API_Brasil.Response.Payload.uf) ->  $.Request.Payload.endereço.logradouro
```

**Input attributes**

Observe how the different parts of the API data structure appear in the data mapping:

* Response
  * Payload
    * Logradouro
    * Município
    * UF

```
concat($.API_Brasil.Response.Payload.logradouro$.API_Brasil.Response.Payload.municipio$.API_Brasil.Response.Payload.uf)
```

- `concat`: the concat function joins the three elements into a single string.
- `$.`: common convention in languages and data structures that use path notation to access elements within objects or JSON.
- `API_Brasil.Response.Payload.logradouro`: this path points to the "logradouro" field within the API Brasil response payload. 
- `API_Brasil.Response.Payload.município`: this path points to the "município" field within the API Brasil response payload. 
- `API_Brasil.Response.Payload.uf`: this path points to the "uf" field within the API Brasil response payload. 

**Output attributes**

* Request 
  * Payload
    * Endereço
      * Logradouro

```
$.Request.Payload.endereço.logradouro
```

This snippet indicates that the concatenation result (the complete address) will be stored in the "logradouro" field of the request payload.

##### Data Mapping with Full Body

In the upper right corner of **Data Mapping**, you can enable or disable the **FULL BODY** button. 

This way, the connector request is sent with the properties, structures, and values in the call request and you don't need to map them one by one.
By enabling the button, you automate the entire data mapping process.

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/full_body_86582ac4f3.gif)

To automate your process, follow the steps below:

<Steps>
<Step>
Enable **FULL BODY**.
</Step>
<Step>
In the **Input Data** field, select the step that contains the data to be mapped. 
You can select the request/response payload from connectors, the request payload from the trigger, or For Each.
</Step>
<Step>
In **Full Data Mapping**, view the automatically created mapping transforming the "FROM" fields to the "TO" fields.
</Step>
<Step>
Click **CONFIRM** to save the data mapping.
</Step>
</Steps>

Once saved, you will be able to view it below the **Body** tab and the edit option will be enabled.

#### Header

When you click the **Header** tab, you see the headers associated with the route chosen in the REST API connector form configuration.

Configure the following fields:

* **Name**: by default, the form loads the name automatically.
If there is none, you can enter it manually.

* **Value**: enter the header value. 
You can do this manually or by using the ![expression icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/expression_builder_icon_51852bbe38.png) button to access the [Expression Builder](/docs/integrations/ipaas-legacy-expression-builder).
In this case, you can create expressions or just use the **Properties** column to select the attributes and click **CONFIRM**.

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/header_connector_5597eaa871.png)

#### Query

When you click the **Query** tab, you see the query parameters associated with the route chosen in the REST API connector form configuration.

Configure the following fields:

* **Name**: by default, the form loads the name automatically.
If there is none, you can enter it manually. 
The assigned name cannot contain spaces. Use, for example, "tax10" or "tax_10" instead of "tax 10".

* **Value**: enter the query parameter value. 
You can do this manually or by using the ![expression icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/expression_builder_icon_51852bbe38.png) button to access the [Expression Builder](/docs/integrations/ipaas-legacy-expression-builder).
In this case, you can create expressions or just use the **Properties** column to select the attributes and click **CONFIRM**.

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/query_connector_9d68c0eee9.png)

#### Path

When you click the **Path** tab, you see the path parameters associated with the route chosen in the REST API connector form configuration.

Configure the following fields:

* **Name**: by default, the form loads the name automatically.
If there is none, the field is locked.

* **Value**: enter the path parameter value. 
You can do this manually or by using the ![expression icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/expression_builder_icon_51852bbe38.png) button to access the [Expression Builder](/docs/integrations/ipaas-legacy-expression-builder).
In this case, you can create expressions or just use the **Properties** column to select the attributes and click **CONFIRM**.

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/path_connector_5846599610.png)

After finishing the connector configuration, click **SAVE**.

## Alert

An alert icon ![](https://creative-ball-51b3fc85c0.media.strapiapp.com/alert_Icon_86fad7682f.png) will appear on the connector if:

* The fields below are not configured:
  * **Route**
  * **URL**
  * **Request Timeout**
  * **Security**

* Registered [environment variables](/docs/integrations/ipaas-legacy-variables) are changed or deleted.

* Attributes defined in previous steps are modified or removed while still being used in the configured step.
