top of page
Search

Navigating Onshape API Limits

This past year Onshape introduced new API limits. Previously Onshape always had some kind of limits, although the exact details weren't published. API limits exist in every web platform to ensure the quality and stability of the service. But for Onshape, the total number of calls made was never capped, and there wasn't a cost for those calls. Due to a variety of reasons, this policy has now changed.


For the most up to date information - check out the official Onshape documentation


Onshape limits the total number of API calls a company or user can make in a year. The number is based on the seat count and type of licenses your company has. All API calls are pooled together for a company. If you require additional capacity, Onshape does offer additional paid API calls, but pricing is not made public. Publicly available Onshape apps listed in the app store (such as Renaissance) are currently not subject to this API limits.


Your API usage can be tracked in the developer section of your company settings.

So what counts as an API call? In the most basic sense, any action that you take with the API is an API call. Creating, Updating, Reading, or Deleting information. Getting the list of parts, getting a BOM, adding a feature, updating the metadata of a part. Each of these actions require an API call. Some actions - such as exporting a file - can be more than one API call. 


Part of any Onshape integration planning should include estimations of API calls. Talk with your developer to understand what the usage on a single process can be, and then estimate how often that process is being run in a year. If multiple tools are in use at a company, they all pull from the same available pool of API calls, so communication across departments is important.


How to reduce usage


Whether you expect to exceed Onshape's API limits or not, its still good practice to be efficient with your API usage. API calls not only have a monetary cost, but unnecessary calls can harm application performance.


Here are some tips to reduce your API usage:


1. If you are purchasing an Onshape integrated service or Product that is not publicly listed in the Onshape app store (anything private to your own company), make sure to ask about API usage as part of the discovery process.


2. Only request the data you need. It can be tempting to load all of the possible data "just in case", but its best to only request what is necessary.


3. Request data once, and let user refresh. Many modern web apps will continually update to always have the most up to date information. What if the user loads my app - and then makes changes in their part studio? Its tempting to to refresh data in a loop in order to capture those updates, but that can be wasteful. Its better to give the user a refresh button to let them update the data in your app.


4. Rethink your process. Is it more efficient to export all the files in an assembly and sort them out later, or to only export certain categories of parts? A few extra clicks in a menu could save your company a lot of API usage.


5. Learn how your API endpoints work. There can be multiple ways to achieve the same result, but not each method is the most efficient. Endpoints can have extra options that might just save you some usage. For example, the bill of materials endpoint includes an option for "multiLevel" that will pull the entire multilevel bom in one api call - much more efficient than pulling eaching sub assembly separately. Theres even an option to include the top level assembly, which could save an extra metadata call.


Checks and balances. A few simple checks for a long process could save you from a big mistake. For example, an app that checks every configuration? First check how many configurations you're about to run against, and if the number is unexpectedly high - abort!


Navigating the Onshape API can be a bit daunting - especially if mistakes could lead to unexpected costs. Here at SmartBench Software, we are are experts in Onshape Automation. We can help you navigate your Onshape integration, without any surprises.

 
 
 

Recent Posts

See All

Comments


bottom of page