PolyAPI  >  Learn More  >  Blog

PolyAPI Release 9: Elevating API Capabilities

PolyAPI Release 9

PolyAPI continues to enhance its platform with Release 9, introducing powerful features, improved performance, and robust security measures. This release brings significant updates to the Python, Java, and TypeScript clients, as well as the Poly user interface and infrastructure, ensuring a seamless and efficient experience for developers.

General Improvements

New Project Setup
We’ve added guided project configuration in VS Code for Python and Java, similar to what TypeScript already had. This enhancement simplifies the initial setup process, allowing developers to get started quickly and efficiently.

Server Fx Hot Deploys
Server functions can now be deployed into live traffic with no downtime, ensuring continuous operation and reducing disruption during updates.

Webhook Defaults
Set defaults for optional elements when creating a webhook to provide a more predictable and streamlined experience.

polyCustom in Webhooks
Included the optional parameter in copying webhooks from the tree, making it easier to use for creating responses.

Auth Provider Consistency
Refactored Auth Provider functions to return .data, .status, and .headers like API functions, ensuring consistent behavior across the platform.

SDK Function IDs
Added comments in generated SDK files to include unique function IDs, making it easier to communicate about and fix functions.

Response Elements for Poly APIs
Adjusted response payload elements to follow the same order across the Poly primitives in Poly API endpoints, enhancing legibility and consistency.

Binary Response
Added support for modeling API functions that provide a binary (file) response, expanding the range of data types that can be handled.

AI Assistant Large Payloads
Optimized the handling of very large specifications for functions, improving performance and reducing overhead.

AI Assistant Conversation History
Improved legibility by adding a /view endpoint to provide a human-readable history of conversations. Additionally, added /stats to see how functions scored in the search algorithm, helping the AI Agent narrow down the catalog to a workable set of functions within OpenAI Token limits.

AI Assistant Function Not Found Case
Improved the response for cases where no suitable Poly functions were found, reducing the risk of generating hallucinations.

AI Agent Continuity
With OpenAI decommissioning plugins, we ensured that AI agents continue to work as is and that new ones can be created. Plugins can no longer be installed in the ChatGPT UI and will only be accessible through the Poly API endpoint going forward.

General Bug Fixes

  • Void Webhook Return: Fixed a bug where return without content was not returning to the originator even when configured to wait for a response.
  • WH and Fx Names: Fixed a bug where SDK generation was modifying the casing for user-assigned names of functions and webhook handlers.
  • WH and Security Functions: Fixed an issue where duplicate security function entries were added when a security function was configured during webhook handler function creation.
  • WH Params Now Optional: If webhook params were not included, we would return a 404 before. Now we execute the webhook with undefined values for params not supplied, leaving it to the developer to handle undefined params.
  • Dead Jobs: Fixed a Redis configuration issue that caused some jobs to never execute right after creation.
  • Poly OAS Docs: Fixed examples in our Swagger Docs that were missing schemas and examples.
  • Client FX LogsEnabled: Removed the logsEnabled attribute from custom functions as it did not control or do anything.
  • Server FX Timeouts: Fixed a bug where server function deployments were timing out and getting 502s if they used external libraries.
  • Args as Objects: Fixed a bug where the Poly AI Agent was unnecessarily wrapping function arguments as an object.
  • Deleted Conversations: Fixed a 500 error when retrieving details for a conversation that had already been deleted.
  • User IDs in Auth Functions: Fixed a critical bug where UserIDs were not respected when obtaining new tokens using Auth Provider functions, resulting in a new token being obtained each time.

Python Client v0.2.1

Webhook Handlers
Added support for webhook handler functions using websockets and enabled the AI assistant to discover and suggest webhook handlers.

AI Assistant Accuracy
Piloting an approach to improve the AI assistant’s accuracy by supplying it with generated code in the library. This currently works with Python API functions and prompts the AI to use type definitions available in generated sources for more succinct code generation.

Vari .onUpdate()
Added support for receiving events in Python when variables are updated, enhancing real-time interaction capabilities.

Auth Provider Fx Improvement
Added support for autoCloseOnUrl:false flow to allow an open websocket connection for Poly to capture login events using Authorization Code Flow Grant Types.

Java Client v0.5.0

Webhooks
Added support for webhook handler functions, enabling more flexible and dynamic event handling.

External Libraries in Server Fx
Support for deploying server functions to Poly that use external libraries as dependencies, expanding the functionality of Java server functions.

Type Naming
Normalized type name generation conventions to make all types universally unique and addressable.

Bug Fixes

  • Logging: Ensured Java logs are properly propagated to be visible in /functions/server/{id}/logs.
  • Arg Names: Included argument names in the generation of libraries.
  • New Project Poly Tree: Fixed an issue with the VS Code extension Poly tree not loading properly when a new Java project was created.
  • AI Clear: Ensured the AI agent correctly clears conversation history using /clear with Java projects.
  • Graceful Skipping at Generation: Added graceful skipping at library generation for unsupported function types and duplicate function names.

TypeScript Client v0.11.14

OpenAPI Spec-Based Training
Extended the CLI to include commands for training Poly using Open API specifications, accelerating the population of the PolyAPI Catalog.

Graceful Stopping of Webhook Handlers
Added support for programmatically closing a websocket connection, improving control over webhook handlers.

Install Error Logging
Improved error logs for setup or dependency installation failures, enhancing troubleshooting capabilities.

Infrastructure

Automated Image Signature Verification
Ensures that images used in the product have not been tampered with and can be trusted as the base Poly images for operating the service.

Automated Dependency Vulnerability Scanning
Automated the process of checking for dependency vulnerabilities and reporting to the engineering team, ensuring robust security.

Semgrep Integration
Enhanced our CI pipeline by integrating custom-selected Semgrep rules for automated code security scanning, ensuring robust and secure code.

Dependabot Upgrades
Implemented to automatically update our dependencies, keeping our software secure and efficient with the latest patches.

Automated Security Tests
Established a set of automated security tests based on OWASP top 10 security vulnerabilities, performed with each release.

External SOC 2 Audit
Started but not yet completed, ETA R10 or R11. This will apply to Poly instances hosted and operated by Poly in NA, EU, and Asia in the future.

Slack Alerts
Generated alerts based on resource utilization to notify Poly DevOps (PaaS) or customer DevOps (self-hosted) of potential near-term issues faster.

Multi-Region Database
Configured our database service to be multi-region for our PaaS service, allowing for failover in case of an AWS region failure.

Moving Forward

Release 9 of Poly API brings substantial improvements and new features to enhance the developer experience and ensure the reliability and performance of our platform. These updates reflect our ongoing commitment to providing robust, flexible, and secure API management solutions.

For more details, visit our documentation site or contact our support team. Your feedback is essential as we continue to innovate and improve Poly API.

Share this Article: