Third-party API Request

Action type with which we can make a request to third party APIs and get or process that data.

This action is where we can configure third-party APIs(like public API) whose data can be used for another part of actions to process that particular function.

ConfigurationDescription

URL

Enter your endpoint for making the requests

Request method

Select your requested method (GET,POST,PUT,DELETE)

Headers

Enter your necessary headers as key, value

Body payload

Enter your body payload, suppose the request is PUT or POST

Return as

A string value that contains the processed result of this action

Configuration for Headers and Body payload

For Headers and Body payloads values can be given in three types.

  1. Constant

  2. Payload

Constant:

Constant values for headers, body payload can be configured from fireapis UI by default you will have the configuration as constant input

Payload:

Endpoint type functions can be consumed in two methods GET and POST, if the POST method is used we can give a function with your payload.

From that payload, we can also add a configuration for headers or body payload in action to use the value from payload given to the function as below screens shot

In above screenshot we have used $payload.data.email, $payload.data.authorization_token where our function payload is as below json

{data:
    {
        authorization_token:"yinsbd.djhbfuweiwoe912bhjc.12dfvdv",
        email:contact@fireapis.com
    }
}

$payload represents the value source from the given payload

data.email & data.authorization_code represents the path from payload value should be taken

Note:

In this action, if we need to configure a value to be taken from a JSON, we can give it as a key separated with ".". Below is the example

JSON: {"user":"name":"fireapis"}

If we need the name key value to be mapped, then the path will be user.name.

Last updated