APIs Integration
In this section, you'll learn how to create and manage APIs to interact with external systems, fetch data from knowledge bases, and integrate these APIs seamlessly into your bot’s conversational flows using the Advanced Builder.
❗️ This section is intended to old user’s whose use case has not been migrated on the Flow Builder yet. Every new use case must be created on the Flow builder
API Overview
Operations: Perform actions like fetching information or posting updates to external systems.
Data Fetching: Retrieve data from your bot's Knowledge Bases to enhance interactions.
API Groups and Management
APIs are organized into groups, which act as folders for better management. You can easily add, edit, or delete groups and their associated APIs.
Actions
Within an API, you can use the top-right menu to duplicate or delete it. Duplication allows you to reuse the API in another bot instance.
API Configuration
Name: Choose a descriptive name for your API for easy identification in conversations.
Linked Bot Action: Displays where the API is used within the bot.
API Group: Assign the API to a specific group.
API Type: Select from External API or Knowledge Base.
URL: Define the service URL, supporting Jinja scripting for variable insertion.
HTTP Method: Specify the method (GET, POST, PUT, PATCH, DELETE).
Data Format: Choose between JSON or XML.
Caching: Set caching intervals to optimize performance.
Headers: Add HTTP headers, supporting JSON format with Jinja for dynamic content.
Inputs and Extractions
Inputs: Define and name variables needed for API execution.
Extractions: Isolate and use the data returned by the API, utilizing JMESPath and Jinja scripting for precise data manipulation.
Troubleshooting Common API Issues
IP Whitelisting: Ensure ViaSay backend IPs are whitelisted by the API provider.
User-Agent Issues: Modify the user-agent header if the target API blocks Python-based agents.
Response Time: Ensure the API responds within acceptable time limits (4 seconds to connect, 16 seconds to complete).
API Response Size: Manage response sizes to avoid performance issues, with specific handling based on size thresholds.