Download the Onshape Mobile App

IOS Android
Illustration with an overlay showing Onshape GUI of the Developer portal over a stock image of Python.
READ TIME:
03:02

Quick Summary: How cloud‑native CAD automation with Onshape’s REST API enables scalable, language‑agnostic access to live, versioned design data across systems.


If you've ever tried to automate design workflows with SOLIDWORKS or CATIA, you know the pain. Traditional desktop CAD systems expose their automation interfaces through COM/ActiveX (SOLIDWORKS API), proprietary scripting languages, or macro recorders that barely qualify as programming environments. You write VBA macros or C# code that talks to a local process running on a specific machine, and if that machine isn't running SOLIDWORKS, or is running the wrong version, nothing works.

Onshape takes a fundamentally different approach. Because Onshape is cloud-native, its entire feature set is exposed through a standard HTTP REST API. This changes everything about how you integrate CAD data into your workflows.

Why REST APIs Beat Desktop CAD APIs

No Local Installation Required

SOLIDWORKS automation requires SOLIDWORKS to be installed on the machine running your code. That means your automation scripts are tied to a specific workstation, a specific OS, and a specific license. Want to run a nightly batch job on a server? You need a SOLIDWORKS license on that server.

With Onshape, your code runs anywhere — a laptop, a cloud VM, a CI/CD pipeline. No CAD software installed. No license tied to a machine.

Language Agnostic

The SOLIDWORKS API is primarily designed for .NET languages (C#, VB.NET) and its macro environment is VBA. Stepping outside those options means fighting against the grain.

Onshape's REST API works with any language that can make HTTP requests — Python, JavaScript, Go, Rust, Java. If it can send a GET request, it can talk to Onshape.

No File Management

Desktop CAD workflows revolve around files. Parts are .sldprt files, assemblies are .sldasm files, and keeping them in sync across a team requires a PDM system that adds significant complexity and cost.

Onshape has no files. Documents, parts, assemblies, and drawings live in the cloud with stable IDs. Your API requests reference a document ID, not a file path. There's no "did someone check this out?" problem because there's no checkout model.

Built-In Versioning

Every edit in Onshape creates an immutable microversion automatically. The API lets you reference specific versions directly in your URLs — no external version control system needed for CAD data. This makes reproducibility straightforward: pin a version ID and your query always returns the same geometry.

Real-Time and Collaborative

Desktop CAD APIs operate on local state. If two people have the same file open, you're in trouble.

Onshape's API operates on live cloud data, so the document you're reading via API is the same one your engineers are editing right now, with full conflict resolution handled by the platform.

Key API Concepts

URL Structure

Every Onshape API URL follows this pattern:

https://cad.onshape.com/api/v6/{endpoint}/d/{documentId}/{wvm}/{wvmId}/e/{elementId}

  • d/{documentId} — the document (24-character hex ID)
  • w/{workspaceId} — a mutable workspace (for writes)
  • v/{versionId} — an immutable version (for reads)
  • m/{microversionId} — a specific microversion
  • e/{elementId} — a specific element (part studio, assembly, drawing)

Token Refresh

Access tokens expire. The requests_oauthlib library handles this automatically when you pass auto_refresh_url and token_updater — it will fetch a new token using the refresh token and continue the request transparently.

Rate Limiting

Onshape includes rate limit headers in every response. If you're building batch processing tools, check these headers and back off when needed.

Turn CAD Data into a First-Class Data Source

With authenticated API access in place, you can:

  • Fetch part metadata: Mass, volume, material properties from a Part Studio
  • Export geometry: Trigger STL, STEP, or IGES exports programmatically
  • Read assembly structure: Get the full bill of materials tree
  • Listen for changes: Use webhooks to trigger workflows when a document is updated
  • Write back: Update configurations, create versions, or modify properties via POST endpoints

The Onshape REST API turns your CAD data into a first-class data source that any system in your stack can query. No SOLIDWORKS license, no PDM server, no VBA macros required.

Get Started with Onshape REST API

For step-by-step setup instructions — registering your app, configuring OAuth, and making your first API call — see the official Onshape API documentation.

The Onshape Discovery Program

Learn how qualified CAD professionals can get Onshape Professional for up to 6 months – at no cost!

Latest Content