REST
Last updated
Last updated
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.
In the Studio, go to the Tasks panel.
Under the ETL section, select REST.
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:
Example:
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.
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.
Headers tab: add custom headers like Authorization, Content-Type, Accept, Bearer Tokens
Authorization tab: configure Basic Auth.
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.
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.
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.