Prerequisites
To create a custom connector, you’ll need:- The base URL for the API you’re connecting to
- Credentials for the authentication method you want to use
- Information about the endpoints you want to add
Add a custom connector
- In the left navigation, click , then Custom Connectors.
- In the top right of the Custom connectors dashboard, click Add connector to open the custom connector editor.
- Click the Rename connector pencil icon to the right of the custom connector’s default name, and enter a unique, descriptive name.
- (Optional) Click the
</>icon to the left of the custom connector’s name to upload a logo image for this connector. The image is used as the custom connector’s component icon on the Designer canvas. In the Update connector logo dialog, enter the URL of the image, then click Apply.
Configure endpoints
In the custom connector editor, the endpoints that have already been added to the selected custom connector are listed on the left. You can manage these endpoints as follows:- To rename an endpoint, click the Rename endpoint pencil icon next to its name and enter a new name.
- To add another endpoint, click Add an endpoint at the bottom of the Endpoints list on the left side of the custom connector editor.
- To clone or delete an endpoint, click the three dots … next to its name to access these options.
- Request, where you configure the request to send. This tab contains four sub-tabs:
- Pagination, where you configure how the returned data is paginated.
Request tab
To create a request, provide the request method and URL of the endpoint you want to configure:- Select the request method of the endpoint you’re configuring:
- The default request method is
GET. To create aGETrequest, do not change the request method. - To create a
POSTrequest, click theGETdrop-down and selectPOST.
- The default request method is
- In the URL field next to the request method, enter the URL of the endpoint to configure.
Authentication tab
Your authentication credentials are only used for sending test requests to validate your custom connector configuration. They aren’t saved in the custom connector editor.The custom connector only saves the authentication type. When configuring your custom connector in Designer, you’ll provide your credentials as secrets.
- Click the Authentication tab.
- In the Authentication type drop-down, select the authentication method you want to use to connect to the API. The table below provides an overview of the available authentication methods.
- Enter the required credentials for the selected authentication method, or select the OAuth connection that you want to use to authenticate your custom connector.
Hash-based Message Authentication Code (HMAC) authentication is only available for the Azure Cosmos DB for NoSQL Flex connector.
Parameters and Headers tabs
In the Parameters tab, you can add and configure query parameters and URI parameters. In the Headers tab, you can add and configure request headers that define the HTTP(S) interaction. Each parameter type serves a different purpose:- Query parameters are added to the end of the URI as key-value pairs. Available parameter keys and values can be obtained from the API provider—for example, adding
?currency=USDto the end of a URI queries for data wherecurrencyisUSD. Query parameters can be constant or configurable. - URI parameters are included in the endpoint URI itself, before any query parameters. They are always configurable, because they essentially let you retrieve data from different endpoint URLs using one custom connector. The request will fail if no value is set for a URI parameter.
- Header parameters are included in the request header and are used to provide additional information that doesn’t belong in the URI, such as metadata, authentication tokens, or data that shouldn’t be included in the URI for security or versioning reasons. Header parameters can be constant or configurable.
- Click the Parameters or Headers tab, depending on the type of parameter you want to add.
- Click Add a query parameter, Add a URI parameter or Add a header parameter to add the corresponding parameter type to this endpoint.
- For each parameter, complete the following fields:
- In Name, enter the parameter name.
- In Value, enter the parameter value.
- For query parameters and header parameters, use the Configurability toggle to set the parameter as Constant or Configurable.
You can also add query parameters by adding
?<parameter-name>=<parameter-value> to the end of the URL. For example, adding ?status=successful to the end of the URL will add a query parameter called status with the value successful.Configurability
Each query parameter and header parameter can be Constant or Configurable. URI parameters are always Configurable. This setting affects how the value of the parameter is sent in the request:- Constant: Always use the value set in the custom connector editor for this parameter. For example, if you set an aggregation period parameter to Constant, you will always fetch data for the specified time period using this custom connector.
- Configurable: Set the value of this parameter when the custom connector is used in a pipeline. This lets you use a variable to set the value of the configurable parameter each time the custom connector is used in a pipeline. For example, if you set an account ID parameter to Configurable, you can use the custom connector to fetch data from different accounts.
Body tab
This field is only enabled forPOST requests. Enter any data to be sent from the client to the API. Like URI and Header parameters, the Body field supports configurable values in the form of pipeline or project variables using the standard ${variable} syntax. For more information, read Variables.
A request body is only required for
POST requests. If you’re configuring a GET request, the field isn’t editable and you don’t need to enter a request body.
Pagination tab
If you’re fetching large datasets using a custom connector or Flex connector, we recommend using pagination to make sure that your request fetches the full dataset and to prevent errors that may occur if the connector tries to fetch the whole dataset at once. For example, an API might limit responses to 100 records per request. Without any pagination, your connector only retrieves the first 100 records. With pagination, the connector automatically retrieves each subsequent page until the full dataset is returned. In the Pagination tab, you can set your pagination method. The pagination method determines how multiple pages of data are retrieved from the API. The custom connector editor provides pre-built pagination methods that you can configure. You can also select Script pagination, which lets you script your own custom pagination method with control over pagination, rate limiting, and API request and response management.- Click the Pagination tab.
-
Click the pagination method you want to use:
- No Pagination: No pagination—fetches all data without splitting it into pages.
- Relative Path: Navigates to the next page using the relative URI provided in the response.
- Full Path: Navigates to the next page using the complete URI provided in the response.
- Page Based: Navigates to the next page by incrementing a page parameter, for example
?page=1. - Link Header: Navigates between pages using the link header in the response headers.
- Offset: Navigates to the next page by incrementing a query parameter, for example
?offset=0&limit=10. This method is often used with SQL-like databases. - Cursor: Navigates between pages using a cursor parameter, for example
?page_size=10&cursor=id001. - Script: Lets you script your own custom pagination method.
-
Configure your selected pagination method as explained in the corresponding tab below.
- No pagination
- Relative path
- Full path
- Page based
- Link header
- Offset
- Cursor
- Script
This is the default setting for new custom connectors and doesn’t require any configuration.When No Pagination is selected, all data is fetched, without splitting it into pages. This is suitable for small datasets that can be fetched with a single request. - (Optional) Click Test pagination to test your pagination settings.
Send a test request
Click Send to make a test request. After making a test request, the status code of the request is shown in the bottom right of the custom connector editor, for example200 (success).
Click the tabs at the bottom of the custom connector editor to view and configure the following details.
Response
Click the Response tab to view the response, structure, and headers. You can’t edit the raw response or headers, but you can edit the structure to configure the API’s response. This structure is used when loading your data into your destination. Make sure that the structure shown here accurately represents the API’s response to ensure that your data is loaded correctly. To edit the structure:- In the Response tab, click the Configure structure icon in the top right of the Structure section.
If you’re editing an existing custom connector or Flex connector, you may need to unlock the structure to edit it. To do this, click the Structure is locked icon in the top right of the Structure section.
- The Configure the structure dialog shows the API response as a tree structure containing each column’s name and data type. Use the arrow icons to expand and collapse nested parts of the structure. Click the three dots next to any element in the structure to make changes:
- When editing an array or nested element:
- Click Set as selected data to set this array or nested element as the part of the schema the connector will fetch data from.
- Click Add element to add a new element inside this array or nested element.
- When editing any element:
- Click Edit element to change the element’s name or data type.
- Click Delete element to remove this element from the API response.
- When editing an array or nested element:
- Click Apply.
- (Optional) Click the Structure is unlocked icon in the top right of the Structure section to lock the structure.
Save your connector
Click Save in the top right of the custom connector editor to save your custom connector. It will appear in the list of available custom connectors in the Custom connectors dashboard, and can be added to orchestration pipelines in Designer like any other connector. For information about configuring custom connector properties in orchestration pipelines, read Custom connectors in Designer.The Save button is disabled if your custom connector doesn’t have a name or if there are no endpoints configured.
