PolyAPI continues to advance its platform, delivering enhanced functionality, improved performance, and robust security measures with Release 10. This update, spanning various client libraries and Poly’s user interface, demonstrates our dedication to providing an exceptional developer experience and reliable API management tools.
General Improvements
Runtime Flow Improvement
We have implemented caching mechanisms to accelerate function execution and variable retrieval times, ensuring a smoother and faster runtime flow.
SOC 2 Preparation
Completed internal preparations for the upcoming SOC 2 audit, reinforcing our commitment to security and compliance.
Python Client
Python Security FX
Webhooks now support Python security functions, enabling custom security checks written in Python to be executed when webhook events are received before delivery to subscribers.
Error Handling Enhancements
- Error Handler: Introduced the
error_handler.on()
function for subscribing to Poly Proxy-specific error events. - Multiple Error Handlers: Added support for running multiple Python error handlers concurrently within the same script.
- Multiple Webhook Handlers: Enabled running multiple Python webhook handlers simultaneously within the same script.
Webhook to Server FX Triggers
Python server functions can now be triggered by webhook events, enhancing the integration and responsiveness of your applications.
Client FX Deployment
Added support for the deployment and client SDK generation of Python client functions, streamlining the deployment process.
Server FX Status Codes
Python server functions now support setting specific response status codes and content types through .polyCustom
.
Bug Fixes
- Python Response Type Fix: Corrected issues with custom function response types, providing clear error messages when using
typing.TypedDict
and guiding developers to usetyping_extensions
for proper modeling. - External Library Contamination: Fixed a bug where dependencies of one custom server function affected other functions in the same context.
- Webhook Control Improvements: Improved the process for starting and stopping webhooks using Ctrl+C, providing clearer messaging.
- Error Messaging: Enhanced the clarity of ‘500’ error response messages for server functions, offering more detailed diagnostics.
Java Client
Java WH
Added the ability to receive and handle headers and parameters when using webhook handlers, increasing flexibility in handling webhook events.
Webhook to Server FX Triggers
Java server functions can now be triggered by inbound webhook events using Poly Trigger configurations.
Deployment Optimization
Implemented a filtering feature to allow the deployment of only specific functions, optimizing resource use.
Java FX polyCustom
Extended support for polyCustom
to Java server functions and webhook handlers, enabling more precise control over response content.
Node Client
Open API Spec Training
- Parameter Handling: Updated to automatically set
removeIfNotPresentOnExecute: true
for all non-required parameters, including headers and query params. - API Call Optimization: Improved
npx model train
to make individual API function calls, preventing server overloads. - Tier Checkings: Implemented tier checking during training to avoid exceeding the maximum allowed threshold of functions for a tier.
- Argument Properties: Added a ‘required’ argument for each parameter in the generated JSON, simplifying model editing.
- Disable AI Generation: Added the option
–disable-ai
to skip AI-based generation of descriptions for functions and arguments when not found in the OAS duringnpx poly model generate
. - Support Serialization: Updated handling of query parameters and headers to support various styles and explode options.
- Optimized Model Generation Performance: Deployed improvements for faster generation and added fallback to use
requestBody.description
when schema descriptions are absent. - Minor Version Support: Improved support for minor version changes in OpenAPI specifications.
- OAS Source URL Input: Updated
npx poly model generate
to accept URLs or file paths for OpenAPI specifications, enabling easier model generation. - oAuth2 Security: Now saved as a bearer token auth argument.
- TS Interface Naming Conflict: Added a custom error message for interface naming conflicts with global TypeScript types, advising renaming to avoid errors.
PolyUI Beta
Dynamic UI for Variable Management
Created the first page for administering Poly using the upcoming Canopy service, allowing programmatic rendering of UIs based on Poly functions and a config file.
Minor Server Improvements
- Variables Endpoint: Updated variable values to appear only on
/variables/{id}
, removing them from the/variables
list view. - Raw String Query Parameter Support: Improved functionality for sending query parameters as raw strings, enabling direct entry of complex queries.
- Library Tree Copy Issue: Fixed an issue with the ‘Click to copy’ functionality from the Library Tree.
- Payload Argument Modeling: Addressed an issue where payload arguments were not correctly modeled in JSON generation.
- Tier ID Update: Resolved a caching issue preventing updates to tier IDs for self-hosted instances.
- Webhook Creation Error: Fixed a 500 Internal Server Error issue during webhook creation.
- Webhook Timeout Error Handling: Corrected an issue where webhook timeouts returned a 200 status code instead of an error response code.
- polyCustom Fix: Resolved an issue where
responseContentType
was not resetting after each function execution.
Advancing API Management
Poly API Release 10 focuses on enhancing functionality, streamlining processes, and bolstering security across the platform. These updates ensure that developers have the tools they need to build robust, efficient, and secure applications with Poly API.
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.