API

Other systems can use Gaio's analytical intelligence through APIs. This feature allows you to connect Gaio flows to external services via RESTful APIs, using secure authentication through API Keys.


How to Use


1. Access the API Tab

  • On the left-hand panel, click the API icon.

  • Use the API Key tab to create and manage your keys.

  • Use the API tab to configure API calls to external services.


2. Create an API Key

  1. Click the "+" button in the upper right corner of the API Key tab.

  2. Fill out the fields:

    • Name: Name of the key (e.g., Doc).

    • Status: Select Active.

  3. Click generate.

  4. Once the key is generated, copy and save it securely.

  5. To view or renew the key, use the eye icon or the renew button.

  6. Click Save.


3. Configure an API Integration

  1. Go to the API tab and click "+" to add a new integration.

  2. Fill in the fields:

    • Name: Integration name (e.g., SendToCRM).

    • Endpoint: Only the final endpoint name (e.g., https://api.example.com/send).

  3. Select flow (optional): choose the Gaio flow to be executed.

  4. Return table: select the table that contains the data that will be consumed via API.

  5. Go to the API Key tab and check the previously created key.

  6. Click Save.


4. Execution and Results

After saving the configuration:

  • The API can be triggered manually or as part of an automated process in Gaio.

  • If a process is selected, whenever a Gaio API endpoint is called, that process is executed. This means that any analysis can be performed through calls external to Gaio, such as creating/applying a predictive model, inserting, deleting, calling external APIs (REST), accessing data sources external to Gaio, and all other features.

  • Row limit : It is possible to limit the number of rows to be returned by the Gaio API, even if the generated table has millions of rows.

https://your_url/endpoint?limit=10
  • Use limit and offset parameters to implement pagination and navigate through large datasets.

https://your_url/endpoint?limit=10&offset=10
  • Retrieve data in pages using the limit and page parameters for better user experience with large datasets.

https://your_url/endpoint?limit=10&page=1
  • Add custom parameters to filter and customize API responses based on specific criteria. If the query that precedes the API task filters the table with this parameter, only the requested data will be sent in the API result. Example: enter the client code in the API call and Gaio will return the products to offer for that specific client.

https://your_url/endpoint?limit=10&page=1&param_name_one=sales&param_name_two=male

Best Practices

  • Security: Never share your API Key. Use the Inactive status to temporarily disable access.

  • Versioning: Create new entries for APIs with structural changes.

  • Validation: Test endpoints manually before embedding in automation flows.

Last updated