Connect Any API

Section header image mobile

With Coefficient's Connect Any API integration, accessing data from various API source systems becomes seamless. Import your desired data through API requests and write them directly into your Google Sheets or Excel workbook easily. Then, automate your import to refresh ensuring your data is always up-to-date, allowing you to concentrate on creating insightful dashboards and optimizing your workflow. 🚀

What is Coefficient's Connect Any API?

Connect Any API Configuration

Endpoint URL

Authentication Type

Headers

Parameters

Pagination

Create an Import with Connect Any API

Schedule your Import, Snapshots, and Add Automations

FAQs for Connect Any API

 

What is Coefficient's Connect Any API?

The Connect, Any API feature with Coefficient enables you to make API requests and automatically organize the response into a spreadsheet. You can configure an API by providing the endpoint URL, Authentication Type, Headers, Query Parameters, and Pagination details. Similar to regular Coefficient imports, you can schedule it to auto-refresh or set a schedule to snapshot your data.

Connect Any API Configuration

Before we start, let's review the essential concepts and information you need to know to import your data using Connect Any API.

Endpoint URL

An API Endpoint URL is an address that grants you access to the API's data and its various features. The endpoint URL is comprised of two main parts: the Base URL and the Endpoint. The following example illustrates a basic API Endpoint URL; however, depending on the dataset you are looking to import, you may have multiple endpoints in your URL path.

Example: 

Screenshot 2024-03-16 at 12.26.04 AM.png

Base URL: https://api.example.com/

Endpoint: /posts

ℹ️ PRO TIP: Please consult their API documentation site to build your API endpoint URL, depending on the source system from which you want to import your data.

Authentication Type

Certain API services require authentication to ensure you have sufficient permissions to make the API call. When importing using Connect Any API, you can select the authentication type for your API call. We strongly advise reviewing the system's API Documentation to understand better the authentication type required for your API call.

Example:

Screenshot 2024-04-12 at 7.53.04 PM.png
  • None
  • Bearer Token - An access token used to authenticate/grant access to a specific resource. It is passed within the request header as an authorization credential. 
  • Username Password (login credentials)
  • API Key - This form of authentication allows developers to access and interact with the API securely. 

Headers

Headers contain supplementary data that represents the metadata associated with your API request. When you've accurately specified the Authentication type, additional headers may not usually be required in most API definitions. However, if you suspect that the API you intend to import from uses authentication different from the provided options, you can use headers to specify the authentication details for the API.

Example:

Screenshot 2024-03-20 at 1.53.40 AM.png This example shows an authorization header to use the API key (often provided by the source system) when making an API request.

Parameters

API parameters can be likened to "search filters" for your API call. Depending on the parameters you specify or those available from your system's API, the results of your import may vary. When including a parameter in your API call, you must provide both a Key AND a Value.

Example:

Screenshot 2024-04-12 at 8.02.46 PM.png ℹ️ PRO TIP: For the list of all available parameters that you can use, please refer to your system's API documentation.

Pagination (None, Cursor Based, Offset Based)

Pagination is crucial in your API call, particularly when importing a large dataset. It enables you to break down your data into smaller subsets or pages. With our Connect Any API, we offer support for three pagination methods: None, Cursor Based, and Offset Based.

Example: 

Screenshot 2024-03-20 at 6.35.21 PM.png
  • None: Pagination is not employed in the API call, resulting in data returned from a single page only. For example, if your dataset comprises thousands of records, but the initial page only returns the first 100, only those 100 records will be displayed in your import.
  • Cursor Based: With cursor pagination, you need to enter your cursor parameter name, which represents the last item returned from the previous query and is used as a unique identifier that tells the system where to start fetching the next set of results.
  • Offset Based: This method is often used to paginate large datasets by specifying the number of items to skip before retrieving the next set of results. Often used with a "limit" parameter, which specifies the maximum number of items to fetch in each request. 
    • Request Offset Parameter Name - This is the pagination parameter expected to be sent from you to the system housing the data as part of your API request.
    • Response Offset Parameter Name - This is the pagination parameter you received as part of the response for an API call. This data comes through from the source system.

ℹ️ PRO TIP: Refer to your source API documentation to confirm which pagination type is supported.

 

Create an Import with Connect Any API

Let's walk through how to create a Coefficient import with Connect Any API. 

Example: You are a trader and need to import the latest cryptocurrency listings using CoinMarketCap's API. We will use the Listings Latest endpoint for this scenario to fetch all active cryptocurrency coins with their latest market data.

ℹ️ NOTE: If you are following this example, you will need to sign up for a free account from CoinMarketCap. Make sure to copy your API Key, which we will use later.

1. Click “Import from…” in the sidebar.

ImportFrom.png

2. Select "Connect Any API".

Screenshot 2024-05-24 at 10.37.53 AM.png

3. Select “Start from scratch”.

Screenshot 2024-05-24 at 10.39.49 AM.png

4. Enter the information needed for your API call.

Example: For CoinMarketCap's listing latest endpoint, we used the endpoint URL below ( from their API documentation) and added a header parameter to supply the API key generated from your account. Then, we added a query parameter to filter the data and only returned the cryptocurrency type "coins."

CustomAPIExample.png  

5. Upon clicking "Preview," the fields/columns returned by your API call will be presented. You can choose the necessary fields for your import by selecting or deselecting them.

ℹ️ NOTE: Only the first 100 rows from your API call are shown in the "Import Preview" window.Screenshot 2024-03-20 at 10.10.18 PM.png

6. To adjust your Endpoint URL and other settings in your API call, click the "Change" link (screenshot). You can also limit the number of rows returned on your import under "Settings".

Settings: We aim to automatically identify the node (array) in the API response that contains the data you're interested in. If you notice that the responses are from a different node, you can update them under Settings.

Limit: The maximum number of rows returned from your API call. (The default limit is 1,000 rows).

CustomAPISettings&Limit.png7. Once you've set up your Connect Any API import settings and checked the sample data, click the Import button (located at the top right corner). Congratulations on successfully creating your first import using our Connect Any API integration! 🎊Screenshot 2024-03-21 at 12.01.40 AM.png

Schedule your Import, Snapshots, and Add Automations

Once you have pulled your data into Sheets using Coefficient, you can set up the following:

1. Schedule your Import

Scheduled_Refreshes.png

2. Turn on Snapshots

Snapshot.png

3. Set Up Automations

AutomationswithGPT.png

FAQs for Connect Any API

Is it possible to connect any platform using the Connect Any API integration?

To determine compatibility, please check the platform's authentication method. If the platform uses OAuth-only authentication, the connector will not be supported.

What types of APIs does Coefficient support with their Connect Any API? 

Currently, Coefficient's Connect Any API supports REST or RESTful APIs. 

Which API methods does Coefficient support with Connect Any API? 

Currently, Coefficient supports the GET method with our Connect Any API. If you need to use a different API method, please contact support@coefficient.io so we can note your request.

Does Coefficient support filters, sorts, and other advanced settings with Connect Any API's?

Filters and sorts can differ for each API. We highly recommend checking your API's source documentation to see which settings are supported. You can filter or sort your data by using the query parameters option in your API call.

Is Connect Any API secure? 

Coefficient's Connect Any API integration is as secure as our other integrations. We do not store/access any of your data on our end. Upon receiving the response from your API call, we solely utilize it to write directly to your Google Sheets or Excel workbook. For further details on our Data Security, please refer to this article.

 

Was this article helpful? 1 out of 1 found this helpful