1. Home
  2. ...
  3. Resources and operations
  4. Create from Connector

Create from Connector

Creating API resources from connectors enabled on the Platform.

You can create resources from connectors that are enabled on the platform. Read more about connectors and how to enable them.

To create a resource from a connector:

In the API Catalog menu, go to the API resource editing screen;

Click the Create from Connector button;

Select the desired connector from the list or search by its name;

Check the Create using instruction option;

Add the resource name (required) and an optional description.

After creating the resource, you'll be redirected to the editing screen, where you can add operations to the resource:

Click Add New Operation;

Enter the HTTP method and path. Optionally, add a description;

In the Instruction field, use the connector's reserved words. This field has autocomplete to help you create the instruction.

POST Operation for an AWS Lambda Connector

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 saved resource in the API will have a connector label linked to it:

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.

NOTE

The Instruction field understands the native syntax of the protocol to which the connector enables access. For example, for database connectors, an Oracle connector does not allow ; at the end of the instruction, while a MySQL connector does.

Example with SQL Connector

Creating an operation with the SQL connector to return a query on a database table:

Click Add New Operation;

Select the GET method;

In the Path field, enter: /users

In the Instruction field, enter:

The result will be a JSON with the query data from the users table following the provided instruction.

TIP

You can use header, path, query or body parameters in the connector instruction. Use the following variables:

  • $headerParam.HEADER_NAME
  • $queryParam.QUERY_NAME
  • $pathParam.PATH_NAME
  • $body.ATTRIBUTE_NAME

Refer to the connector variables subsection for more details on variable syntax.

After saving the API, you can make requests to the configured resource.

How happy are you with this page?

We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more