Methods

Methods implement various logic in a connector, such as extracting auth credentials, running data collection operations, handling events, etc.

You will find methods in the methods field of many connector elements. Here is an example of a Data Collection spec:

name: "Contacts"
fieldsSchema:
  type: "object"
  properties:
    id:
      type: "string"
    name:
      type: "string"
    email:
      type: "string"
methods:
  list:
    implementationType: "rest-api-mapping"
  create:
    implementationType: "javascript"

In this example, the data collection has two methods: list and create. One of them is implemented using REST API mapping, the other is implemented using custom JavaScript.

Implementation Types

Methods can be implemented using one of the following implementation types:

  • Mapping – Transform input data using JSONata expressions without making API calls
  • REST API Mapping – Map to REST API endpoints
  • JavaScript – Write custom code for maximum flexibility
  • not-supported – Mark method as not supported by the connector