Skip to content

Rest API

Estimated reading: 1 minute 535 views

This function allows the user to invoke a REST API by specifying the API URL, request type (e.g., GET and POST), headers, and body content. The Rest API interface is designed to integrate external APIs within a data pipeline or job. It facilitates seamless data retrieval or transmission using standard HTTP methods.

How to use the REST API?

Step 1: Import the RestApi transformation and open it.

Step 3: The “Import CURL” toggle allows you to import API requests written in CURL format.

Step 2: Choose the request type and provide its URL in the given space.

Step 4: Mode: Body / Headers

  • Body: Used when you send data (typically with POST).
  • Headers: Where you can set things like authentication keys or content type.

Step 5: Select Format: Json or Text

Ex: Format is set to JSON, meaning the data sent or received is in JSON format.

Step 5: Click “Save.”

For example:

Here, we utilized a Sample Rest API with the following

URL: https://jsonplaceholder.typicode.com/comments?postId=1

//or//

Data –

  • For the “API Type” field, we opted for “GET.”
  • We provide the above Rest API URL in the “URL” field.
  • In the “Select Format” field, we selected “JSON.”

Preview

Leave a Reply

Your email address will not be published. Required fields are marked *

Share this Doc

Rest API

Or copy link

CONTENTS