Welcome to Fireapis
  • Welcome
  • The Basics
    • Basics
    • Environment
      • Creating an Environment
      • Configure Domain
    • Auth
    • Secrets
    • Tables
      • Creating Table
      • Testing Tables
      • Add a New Column
      • Table Properties
      • Endpoints
      • Data
      • Deleting a Column
      • Deleting a Table
    • Webhooks
    • Marketplace
    • Logics
      • Dynamic Data Source Selection
      • Testing Logics
      • Actions
        • External API Request
        • Query Builder
        • Data Transformation
        • Build Object
        • Build Conditions
        • Other Utilities
          • Token Generation
          • Token Decryption
          • Hashing
          • Validate Hash
          • Encrypt
          • Decrypt
        • Date Utilities
          • Find Difference Between Dates
          • Add/Subtract Dates
          • Format Date
          • Apply Timezone to Date
  • Next steps
    • What Next?
Powered by GitBook
On this page

Was this helpful?

  1. The Basics
  2. Logics
  3. Actions

External API Request

Make external API requests effortlessly with our intuitive interface, enabling dynamic value configuration without code.

PreviousActionsNextQuery Builder

Last updated 2 months ago

Was this helpful?

API URL

This section contains the request method (e.g., GET, POST, PUT, DELETE) and the API endpoint URL. You can find this information in the documentation provided by your API provider.

If your URL includes dynamic values (e.g., https://api.restful-api.dev/objects/7, where 7 is dynamic), you can enter the URL like this: https://api.restful-api.dev/objects/___$id___.

The ___$id___ format allows you to replace 7 with a dynamic value. The ___ (three underscores) acts as a marker, and the $ symbol before id indicates the dynamic part. After entering the URL in this format, you’ll see a parameter field for id, where you can configure the dynamic value to be used.

To set up dynamic values, click the plus (+) icon next to the input field. This will allow you to select the data source model from which the value will be pulled.

HEADERS

This section allows you to configure the headers required for your external API request. In most cases, you will need to pass an API key or authentication key, which you can find in the documentation from your API provider.

To add a header, simply provide the header name and its value. The value can be static or dynamically generated. You can also load the value from environment secrets, where sensitive information like secret keys or other variables are securely stored using the data source model.

For dynamic values, click the plus (+) icon next to the input field. This will load the data source model, allowing you to pull the necessary data dynamically.

QUERY PARAM

This section allows you to pass parameters as query strings in the URL. Query parameters are commonly used for things like pagination or simple search endpoints.

For example, in the endpoint https://api.restful-api.dev/objects, you may want to list all objects. However, if the API supports pagination via query parameters, you could modify the URL like this: https://api.restful-api.dev/objects?page=1&count=20.

To achieve this, you can add query parameters by specifying their names (e.g., page and count). The values for these parameters can be passed dynamically from your request payload (i.e., the data you're sending when triggering your logic created in Fireapis).

For dynamic values, click the plus (+) icon next to the input field. This will load the data source model, allowing you to pull the necessary data dynamically.

This section allows you to pass the body (data) for your external API requests. It will only be visible when the request method is set to POST or PUT.

For example, for a POST request to https://api.restful-api.dev/objects, you might need to send the following body data:

{ "name": "Apple MacBook Pro 16" }

In Fireapis, you can create the body by specifying key names (e.g., name) and setting their values. These values can be configured dynamically to pull from the input payload you pass while executing the logic created in Fireapis.

For dynamic values, click the plus (+) icon next to the input field. This will load the data source model, allowing you to pull the necessary data dynamically.

URL Dynamic Parameters

This section allows you to dynamically add values to the URL. It is useful when calling a GET API that requires an item ID or a reference value in the URL.

This option will appear when you configure the API URL with dynamic values.

For example, for the endpoint https://api.restful-api.dev/objects/7, where 7 is a dynamic value, you can enter the URL like this: https://api.restful-api.dev/objects/___$id___.

Once you enter this, the configuration will display a parameter named id (which is not editable). You can then set the value for id by selecting where the data should come from.

For dynamic values, click the plus (+) icon next to the input field. This will load the data source model, allowing you to pull the necessary data dynamically.

Here we have attached a few videos

Example 1 : Making a GET API request dynamically using a dynamic URL

Example 2 : Making a POST API request dynamically by passing payload or body data dynamically

Enter API URL
Configuration Dynamic Portion of URL as a Parameter
Configuring URL Parameter
Configuring Header Section
Configuring Query Parameters Section
Configuring Body Data for the API Request
Configure dynamic data for body data in request
URL Parameter Configuring
Enter API url image
Configuration dynamic portion of url as a parameter
Configuring URL parameter
Configuring header section
Configuring query parameters section
Configuring body data for the API request
Configure dynamic data for body data in request
Url parameter configuring
Making a Get API request with a dynamic ID passed in the URL
Making a POST API request with dynamic payload