Create from Connector

It is possible to create resources from connectors that are enabled in the Platform. Read more about connectors and how to enable them here.

To create a resource from a connector, click the Create from Connector button on the resource editing screen of an API (inside the APIs menu). All enabled connectors will be displayed and you can also search for a connector by its name.

resourceFromConnector

After selecting a connector, check the option Create using instruction. Add the resource name, which is mandatory, and a description, if desired.

After creating the resource, you will be redirected to the editing screen again, where you can add operations for it (by clicking Add New Operation).

Enter the HTTP method (required), path (required) and description (optional). In the area to describe the instruction, each connector will have specific reserved words with AutoComplete function to assist sentence building.

resourceFromConnector addOperation

In the example above, we are creating a POST operation for an AWS Lambda connector, which will respond in the resource /aws. The Instruction field includes the information expected by the function.

The Instruction field understands the native syntax of the protocol to which the connector enables access. One example regarding database connectors: when you write the instruction for an Oracle connector, you can’t use ; to end it, as you would if setting up a MySQL connector.

Another example of this step is the image below. In this case (of a SQL connector), the registered operation will return a database table query. More specifically, the result will be a JSON with the data queried from the users table (which is the path) and following the instruction defined in the field.

resourceFromConnector addOperationGET

You can use header, path, query or body parameters in the instruction. To do this, use the variables $headerParam.HEADER_NAME, $queryParam.QUERY_NAME, $pathParam.PATH_NAME or $body.ATTRIBUTE_NAME.

We have a subsection to help you with the syntax of the connector variables.

Going back to the AWS Lambda example, the resource to be saved in the API will have a connector label linked to it:

resourceFromConnector resourceLabel

The API must be deployed to the same environment in which the connector is configured. Deploy the API on the Environments section of the API’s Overview screen.

resourceFromConnector environments

After saving the API, you will be able to make a request to the resource that has been configured.

Thanks for your feedback!
EDIT

Share your suggestions with us!
Click here and then [+ Submit idea]