Importing a Connector

General Import

Before getting started, make sure that you have enabled all Connector development tools. Guide here.

Once you're inside the connector builder, click the "Import" button in the right corner of the toolbar. Doing so will start the process of importing a new connector or connector version into the connector builder tool.

It's important to note that importing inside of the connector builder only processes the provided information into the proper UI. It does not Save, Submit or Deploy a Connector for you. This way, if you make a mistake in the import process at all, you don't overwrite a DRAFT or create a new version of a connector accidentally.

First, select the connector file that you would like to import into. You may choose a new connector file at this point to import a brand new connector.

On this screen, you now have two items to set. The first is the method of importing. The options are:
* Copy and Paste
* Github
* API Endpoint

Copy and Paste allows you to simply paste in text that will be converted and brought into the UI for you. This is great if you want a simple way to import a Connector, and are trying to import once, or infrequently.

Github allows you to import from a Github repository. You will need to authenticate (OAuth 2.0) with your account before using this feature.

API Endpoint allows you to request a Swagger or Connector JSON file from a hosted API endpoint, that will be then imported into the connector builder. At this stage you may also choose to "subscribe" to that API endpoint. This means that every time you enter the connector builder, it will check that API endpoint and see if the hosted file has changed. If it has, you will be prompted to see if you would like to automatically updated your connector in a variety of ways.

Once you have chosen your import method, select the type of definition you will be importing. The options are:
* Swagger
* Connector JSON

Swagger will take in any valid Swagger definition and auto-generate Connector JSON for you. See below for more details.

Connector JSON is the default format all connectors are built in. When going through the connector builder normally, you will be building a Connector JSON file.

At this point, if you have chosen a Connector JSON file, once you hit "Continue", your connector will finish importing. If you chose "Swagger", you must configure some settings before the import process can finish.

Swagger Import

Note: This guide assumes that you have a valid Swagger definition already generated. There are many guides to do this for various programming languages, but the basics can be found here.

If your Swagger file is not valid, the connector builder will throw an error at the import set-up phase and not allow the importing process to continue.

After your import set-up has been configured, Swagger settings will need to be set up next.

First, you will see a list of the security schemas available in your Swagger file. Connectors can only support one Authentication schema, so you will need to select the security schema you would like this connector to use. Supported types of security schemas are: Basic, OAuth 2.0, and API Key. All other types must be implemented by a Connector developer at this time.

After this stage, you will see a list of methods you may add to this connector. Only methods that allow the chosen security type will be available to add to your connector. The names of the methods in this list are generated from the optional "operationId" field in your Swagger file. If this is not present, the tool will generate the name by choosing the method and the route name. For example, "getPetFromId" or "Get /{petId}"

After you've selected the methods you would like to import, if you have chosen a security definition with OAuth 2.0, you will also need to pass in your Connector app's Client ID and Secret to set up a client app for Azuqua into your service.

Once this is complete, your connector has been successfully imported! At this stage you can edit the Connector JSON just like normal. Once you're done with that, save, submit and deploy as usual.

Make sure to test your new connector thoroughly!