Gaio DataOS
Gaio DataOS
Gaio DataOS
  • 👋 Welcome to Gaio DataOS
  • GETTING STARTED
    • Gaio DataOS Console
    • Quickstart
  • FUNDAMENTALS
    • Data Projects
    • Studio
    • Database
    • Workflow
  • Data Sources
  • TASKS
    • ETL
      • Builder
      • SQL
      • Source SQL
      • Insert Table
      • Insert Row
      • Update
      • Delete
      • Create Table
      • Quick Table
      • Quick Upload
      • Pivot Table
      • Unpivot Table
      • REST
      • Parameters to Table
      • Table to Parameters
      • Define parameter value
      • Users
      • CSV Web
      • CSV Local
      • Google Spreadsheet
    • Analytics
      • Sample
      • Cluster
      • Principal Components
      • Association Rules
      • Forecast
      • Python
    • Delivery
      • Content
      • Form Card
      • Export CSV
    • Map Editor
Powered by GitBook
On this page
  • How to Use the REST Task
  • 1. Open the REST Task
  • 2. Choose Method and Configure URL
  • 3. Add Parameters
  • 4. Define the Request Body (if needed)
  • 5. Headers and Authorization
  • 6. Result Tab
  1. TASKS
  2. ETL

REST

PreviousUnpivot TableNextParameters to Table

Last updated 4 days ago

The REST Task in Gaio DataOS allows you to connect to any external API — public or private — directly within your data flow. You can use it to fetch data, post information, automate API integrations, and convert JSON responses into usable tables inside your project.


How to Use the REST Task


1. Open the REST Task

  • In the Studio, go to the Tasks panel.

  • Under the ETL section, select REST.


2. Choose Method and Configure URL

  • Select the HTTP method: GET, POST, PUT, DELETE, etc.

  • In the URL field, type the API endpoint.

  • You can use dynamic parameters in the URL:

    plaintextCopiarEditar{{param.name}} or {{table_name.column_name}}

    Example:

    bashCopiarEditarhttps://api.example.com/users/{{user_id}}/posts?status={{status}}

3. Add Parameters

In the Parameters tab, you can define URL parameters:

  • URL Parameter: Name of the parameter (e.g., userId).

  • Value: Static or dynamic value (e.g., {{param.user_id}})

Click + Add Parameter to add more.


4. Define the Request Body (if needed)

In the Body tab, you can:

  • Enter JSON, XML, or plain text content for the request body (mainly used for POST and PUT).

  • Use dynamic variables inside the content.


5. Headers and Authorization

  • Headers tab: add custom headers like Authorization, Content-Type, Accept, Bearer Tokens

  • Authorization tab: configure Basic Auth.


6. Result Tab

This tab controls how the API response is interpreted and converted into a table.

  • Structure Identification: Lets Gaio automatically detect column names and data types. Set to “Automatic” by default.

  • Object Property: Define the path to the array in the JSON response, if it’s nested. Example: results.items.

  • Always Drop Table: If enabled, the existing result table will be replaced each time the task runs.

📌 Behavior:

  • If the API returns a JSON object, one row will be created.

  • If it returns a JSON array, each item will be inserted as a separate row.


7. Error Log Tab

This tab allows you to capture and store any errors encountered during execution.

  • Log Table: The name of the table that will receive error logs from the REST task (e.g., log_api_errors)

This makes debugging and monitoring easier in production.


✅ Best Practices

  • Always run Run test before finalizing the configuration.

  • Use dynamic parameters to reuse the same task with different inputs.

  • When using nested JSON, define the Object Property path precisely.

  • Enable the Error Log tab to trace failed API calls and improve reliability.