Tech Topics

What Are API Connectors and How do They Save Devs Time?

What Are API Connectors and How do They Save Devs Time?

API connectors include the functionality to connect to an API and exchange data. They are built to run on an enterprise iPaaS or embedded iPaaS as part of an integration. If the API is the locked door to a building, the API connector is the person who inserts the key, opens the door, and deposits or picks up packages.

API connectors are also called app connectors. For example, let's say we have a connector that allows us to work with Salesforce. In practice, we would refer to this as the Salesforce Connector instead of the Salesforce API Connector. Yes, we are connecting to an API, but we are getting data from (or sending data to) the app which sits behind the API.

API connectors can work with APIs (REST, GraphQL, SOAP, RPC, and others) and webhooks. Though webhooks are not APIs in the standard sense, they are sometimes referred to as reverse APIs or lightweight APIs since they send data when it changes and not when it is requested – as a standard API would.

What does an API connector do for integrations?

An API connector includes functionality to work with or define the following for integrations:

  • Endpoints
  • Auth (authentication)
  • Actions

The benefit of API connectors is that they abstract the complexity of endpoints, auth, and actions to simplify the process of building the integration. In many cases, non-devs can use connectors to build integrations without requiring that devs pore over API docs to familiarize themselves with the nuances of each API (and then write custom code to connect with them).

Endpoints

An endpoint is a unique URI (uniform resource identifier) provided by an API or webhook. A single API may have many endpoints, each associated with a specific record type or customer. For API connectors running on an embedded iPaaS, they may be accessing shared endpoints (all customers use a single endpoint) or individual endpoints by customer.

Here's an example of a shared endpoint:

https://api.example.com/accounts

This endpoint supports requests for and submission of account data.

Here's an example of an individual endpoint:

https://my-company.example.com/accounts

This endpoint supports requests for and submission of account data for my-company only.

Authentication

An API connector may not always use authentication to connect to API endpoints or webhooks for an integration. However, most APIs (outside of open APIs) require authentication to access API or webhook endpoints.

API connectors often use one of the following types of auth:

  • Basic auth
  • API keys
  • OAuth 2.0

Having auth as part of API connectors means that devs and non-devs don't need to understand and work with auth rules for different APIs when using pre-built connectors, saving considerable time in the integration process.

For more details on using auth, check out our post on authentication methods for B2B SaaS integrations.

Actions

Once an app connector has authenticated to an API or configured a webhook for an integration, the connector performs one or more actions. These actions generally come down to CRUD (create, read, update, and delete) operations for the available data collections.

The possible number of actions is limited only by the API or webhook. A relatively simple API connector, such as one for Amazon S3, includes a few actions for working with objects. On the other hand, an API connector for Shopify has dozens of actions for working with products, orders, items, and more.

Built-in connectors vs custom connectors

Every enterprise iPaaS and embedded iPaaS comes with built-in API connectors. These connectors, in most cases, are built by the integration platform vendor or by the company whose API or webhooks they'll connect to.

You can use these built-in app connectors immediately upon onboarding with the integration platform. In many cases, your non-devs can use these built-in connectors with a low-code designer to immediately build integrations with popular industry-leading apps.

Integration platforms may come with dozens, or hundreds, of built-in API connectors. But you'll eventually find yourself in a position where you need to connect to an API or webhooks for which there is no pre-built connector, such as when you need to integrate with a niche or vertical-specific app.

A fully featured integration platform should allow your devs to create custom connectors precisely tailored to your product and industry.

Whether working with built-in API connectors or custom API connectors, your devs can save substantial time since both types of connectors can be built once and reused forever. For example, once your devs have created a custom connector for your app, the day-to-day work of building integrations with those connectors can shift to your non-devs (onboarding and support team members).

There are two types of custom connectors, with one type being much simpler. The simpler type is a lightweight HTTP wrapper, while the more complex type allows you to write code for just about anything. Be sure the type of connector you choose supports all the necessary functionality.

Making API connectors easy to use

When it comes to coding custom API connectors, here are a few best practices to keep in mind:

  • Wrap everything related to connecting to the API (auth URL, API version, authentication fields, and more) in a connection function. This makes it easier to call or reuse that code as needed.
  • Build actions to be reusable across integrations. That is, make them general enough to work in multiple integration scenarios.
  • Remember that you don't need a one-to-one correlation between API or webhook endpoints and actions. One action can access multiple endpoints to gather data and perform corresponding tasks.
  • Use clear examples and comments for input fields. Simple, unambiguous directions mean that your non-devs don't need to spend time with your devs to figure things out.

Conclusion

API connectors interact with APIs as part of integrations using endpoints, auth, and actions.

Integration platforms, such as enterprise iPaaS and embedded iPaaS, come with many pre-built app connectors. These connectors generally require no additional coding and can be used by non-devs to build integrations right out of the box. Additionally, integration platforms should support custom app connectors for integration scenarios where pre-built connectors are unavailable.

Using API connectors with an integration platform makes building integrations easier, saving time for devs and non-devs alike.

If you'd like to see more content on API connectors and other integration topics, follow us on LinkedIn or Twitter.


About Prismatic

Prismatic is the integration platform for B2B software companies. It's the quickest way to build integrations to the other apps your customers use and to add a native integration marketplace to your product. A complete embedded iPaaS solution that empowers your whole organization, Prismatic encompasses an intuitive integration designer, embedded integration marketplace, integration deployment and support, and a purpose-built cloud infrastructure. Prismatic was built in a way developers love and provides the tools to make it perfectly fit the way you build software.

Get the latest from Prismatic

Subscribe to receive updates, product news, blog posts, and more.