PolyAPI  >  Developers  >  Release Notes

PolyAPI – Release 15

Release Notes 

September 24, 2024
Days since last major release: 28 days

Client Improvements

Node

Improvements:

  • Logs Enabled – can now be set at the time of deploying a server function by including –logs=enabled or flipped back to disabled by including –logs=disabled
  • Better TypeScript Check – at the time of configuring a project, installation was failing with a confusing error if TypeScript was not installed or not the correct version. 
  • Response Content Type and Code – is now respected when a server function is executed through the /execute endpoint. 
  • Limited Context Generation – can now be set at the time of deploying a server function by using
    –generateContexts=foo,bar to improve wakeup times for server functions by scoping down the contexts that are generated at wakeup time.

VS Code Client 

Improvements:

  • Copy Function Code – For server and client functions from within the same environment as the consumer, a developer with a customDev permissioned key can now directly copy the code of the function. This is helpful in accelerating development and troubleshooting. 

Canopy Service (and Poly Management UI)

Improvements:

  • New Management UIs – Added CRUD pages for managing applications and auto-providers. Added list and GET details views for public webhooks.  
  • Execute Server and API Functions – Functions can now be executed from the UI, allowing for easier testing, debugging, and demoing. This will help users determine if the functions are the ones they want before development too. This opens up the potential for a lot of new features too like pre-set trial values, passing in variables, auto interpreting the schema and auto generating test payloads, etc… 
  • Custom Function Code – visible in the UI for server and client functions to make management, troubleshooting and development easier. 
  • About Me UI – added page which shows the current users context like the /whoami endpoint. It includes the name and UI for tenant, environment, user, key, user role and environment subdomain. Will also include permissions in future releases. 
  • Helpful Links – We now have a page in the UI where users can easily find all the helpful links for using Poly. Links include: Poly documentation, Postman scripts for training APIs to Poly, our Swagger Docs and Postman Collection, a download link for Postman, NodeJS and VS Code; a link to our Discord Community and a link to our VS code extension. Any instance specific link automatically sets the right instance in the URL. 
  • Webhook Security Functions – can now be configured using the UI as part of creating or updating webhooks. 
  • Page Titles – All page titles now displayed based on the page you are on, to help with situations where you have multiple tabs of Canopy open. 
  • Next Job Execution Timestamp – now displayed when looking at the details of a job in the UI. 
  • Section Headers – Added to help organize UIs with many collections such as the PolyAPI UI. 
  • Copy Key Button – added to the final step of the signup flow. 

Bug Fixes

  • Updating Source Element – Updating the source element for API functions was not working via the UI, fixed now. 
  • Nullability – Fixed an issue where empty fields were omitted from underlying API calls instead of being sent as explicitly empty when they previously had values. 
  • Dropdown Value Formatting – Instance names and urls were not using the full width of the dropdown at instance selection during signup. 
  • Stripping of Marketing Token – A Google Analytics token was being added when users were being redirected from our website. This now gets swallowed by the Canopy UI on load. 

AI Services

Improvements

  • Integration with Copilot Chat (BETA) – we developed an extension to Github Copilot Chat which allows developers to communicate with Poly through copilot. We see this as an alternative to using our Poly VS Code Extension to interface with the AI. Currently only available to tenants using our NA1 instance (https://na1.polyapi.io). Extension can be installed here: https://github.com/apps/polyapi 

Server & API

Improvements:

  • Git Integration (aka Project Glide) – A new workflow was added for syncing your server/client functions. With two simple commands, you can make sure the code in your git repo and the code deployed to PolyAPI are in sync. There is also a Github action for automatically performing the sync with your dev or prod environment, as appropriate, whenever you push to the corresponding branch. This adds a native CI/CD capability to Poly, with minimal user configuration required.
  • API Function Replication – A new service was added to replicate API functions from one environment to another (can be within the same instance or a totally different instance). This allows for easier promotion of API functions across a lifecycle, easier sharing, and easier automation. This is for customers who want a simpler experience to promote. UI will come in one of the next few releases. 
  • Environment Metrics Collection – ability to set whether metrics should be collected at an environment level. While active metrics will be collected and written to the DB (efficiently). While disabled, previously recorded metrics will still be available to be read, but new metrics will not be recorded. Corresponding UI was implemented for this too. 
  • Webhooks Creation Endpoints – broke POST /webhooks/training into POST /webhooks for general webhook creation and POST /webhooks/training/postman which should be used with poly-training-assistant.js training script as a way to annotate payload elements with //? optional marking and attribute level descriptions.
  • Explicit Tenant Visibility Endpoints – to make it much easier to understand which functions reside in the current environment and which ones are from other environments, we introduced new endpoints for TENANT visibility functions for API functions, server functions, client functions, webhooks, auth-providers, snippets, and variables.
  • Activity Details – Created a new endpoint for activity (usage history) details and moved specifics of the activity from the list endpoint to the details endpoint. 
  • Activity Record for App Config – is now recorded. App configuration is used to create and edit canopy UI applications. 
  • Shared Metrics for Webhook -> Server Function – the same execution ID using the metrics endpoint will load both the performance metrics for the webhook handler and the underlying server function. 
  • Execution IDs Recorded in Job Execution Record – Allows for easy log & metrics troubleshooting based on the server function execution ID in the case that the function errored out when executed. 

Bug Fixes

  • Metrics Collection via Redis – fixed a performance issue caused by writing function invocation metrics directly to the DB. Now metrics are cached and committed in bulk to the DB. This fixes the regression from the last release where we had to disable metrics collection for one release. 
  • Error Handler Triggers – was a regression in the last release that is now fixed. Users can now use triggers to link an error event subscription to a server function again. This is used for advanced monitoring automation and allows full flexibility in implementing error resolution logic. This configuration is still only possible using the API and the UI will be added in the next few releases. 
  • Patching API Function Source – was producing a 500 error, now working as expected.
  • Snippets Bugs – fixed a number of issues with publishing snippets: description patching, patching snippets with the same context & name combination, showing description in the list endpoint, and visibility being reset to ENVIRONMENT each time a snippet is republished. 
  • User, trigger  and tenant Sort Order – was made consistent with other APIs (and UI pages) to show the newest items at the top of the response collection. 
  • Patching Client Fx Arguments – restricted to only allow patching the description of arguments for client Functions. 

Docs, Public Functions and Content

OOB Functions

  • SendGrid Send Email – function was added as part of the poly.OOB.twilio.emails context. 
  • OHIP Authentication – added two explicit auth functions for different token models: poly.OOB.ohip.auth.ocim.client.getToken() and poly.OOB.ohip.auth.ssd.password.getToken() 
  • Renamed Poly Functions – there were some functions which had a context name public which interfered with Java, they were changed to publicVisibility
  • Poly Function Names – Adjusted OOBpolyapi functions to accept an instanceUrl and polyApiKey to be consistent with documentation and postman collections. 

Documentation

  • Webhooks, Triggers, Jobs, and Environments – Added docs on how to create and use webhooks, triggers, jobs, and environments.
  • Incorrect Payload for POST /assistants – now fixed to not include some of the old attributes needed for publishing to the retired ChatGPT Plugin marketplace.

Postman Collection 

  • New API Requests: Added CRUD and special operations:
    • CRUD for auth providers, including tenant and public. 
    • CRUD for assistants, and operations to view conversation history, send messages and start conversations, delete conversations and view generated OpenAPI specs. 
    • GET operations for activity history and details for each activity. 
    • Poly AI Agent operations for getting a list of conversations, and details for each. 
    • Public webhooks list and get details operations. 

Infrastructure/DevOps Improvements

Improvements:

  • Server Function Execution Performance – was improved by using internal addresses of the KNative service within the Kubernetes cluster instead of using external addresses which introduced extra network hops. 
  • Max Function Runtime – server function can now run for a maximum of 60 seconds per execution for the trial and starter tiers. Longer running jobs and server function processes will require either purchasing an always-on function or upgrading to the growth tier. 
  • Compute Allocation Defaults – when limits are set without defaults, KNative assumes the limits to also be the defaults resulting in inefficient compute and memory allocation to server functions by jumping straight to the max limit. Fixed this by setting appropriate values across our cluster. 
  • Improved Self-Hosted Deployment – by simplifying the process of how secrets are initialized into the cluster. (this one is intentionally vague)

Screenshots

Screenshot: Git Integration (aka Project Glide)
API Function Replication