REST API
Discussion List
-
Onshape Timelapse Toolbar - Make timelapse videos of your Onshape modelling from document history
⏱ Onshape Timelapse Make a timelapse video of how an Onshape model was built, straight from the document history. No screen recording, no API key, nothing to install except (optionally) Tampermonkey. Onshape records every change you make as a microversion. This script asks Onshape to render your Part Studio or Assembly as…
-
Editing drawing annotations
Hello, I’m working with the Drawing API and trying to manage General Tables (Onshape::Table::GeneralTable) programmatically. I’m able to create a table successfully using onshapeCreateAnnotations, and I receive a valid logicalId (e.g. h:100000F5) from the modification status. However, I’m running into issues when trying to…
-
Configurations API endpoint
Hi All, I have a Partstudio that has several configurations (A, B, C, D, etc…). When I use the below endpoint. https://cad.onshape.com/api/v13/elements/d/{did}/w/{wid}/e/{eid}/configuration It gives me all the available configurations which I can use to construct my next API calls, however, it always defaults to…
-
API Bug: 500 Internal Server Error when creating newSketch with a circle
Hello all, I'm encountering a consistent 500 Internal Server Error when trying to create a simple sketch containing a single circle via the /api/partstudios/.../features endpoint. I have confirmed that my authentication, API key permissions, and environment are all correct. I can successfully create new documents and even…
-
Adding part to assembly via API
I am trying to add an assembly into another assembly via API. Trying out the REST call in glassworks i get an error saying i am using a microversion even though i am using a version: This is the document I am pasting:…
-
API and Inspection Tables - Quality Control
Has anyone used API to export Inspection Tables to integrate on a secondary software (Dynamics per example) so that the production floor can make the measeurements and verifications required directly in Dynamics? Basically the ideia is to use the Inspection Table as input to Microsoft Dynamics to create the parametrization…
- How can I generate a line in 3D space and extrude a circle along it using the Onshape REST API?
-
API rollbackBarIndex functionality
Hi, I'm trying to output the feature tree from a part studio via python - specifically via onshape-client.client.Client.api_client.request(…) (here) With a standard request, I can output the appropriate response json via the link:…
-
Sheet metal flange using featurescript
Hi everyone! 😁 I'm working on creating a very basic flange on a square flat sheet metal part using FeatureScript. My goal is to eventually generate a 90° flange by selecting the edge of the sheet. I managed to achieve it by copy-pasting the entire code from the official standard library, but I’d like to know how to simply…
-
REST API - Exporting to STEP works, but exporting to OBJ does not
Hello there ! 😉 I'm trying to export my sheet metal part using the REST API, exporting it to a STEP file works fine using the following method : • Initiate the exporting procedure using /api/v6/assemblies/d/{}/w/{}/e/{}/translations and payload = { "allowFaultyParts": True, "angularTolerance": 0.001, "formatName": "STEP",…
-
Which endpoint supposed to perform export anotation request which corresponds to the schema.
I can see this schema in onshape drawing json samples repo, which looks like a way to export drawing annotations separately from full drawing json export, which should run faster and I would prefer to use it:…
-
Using Transform Assembly Occurrences API Call
Hello, I want to be able to move parts around in an assembly with an API Post, and believe the "Transform Assembly Occurrences" call will do that, but can't figure out the JSON syntax. I'm taking the occurrence string from the "Assembly Definition" Get request. Here is one of the request bodies I've tried: { "occurrences":…
-
An easy way to display a 3d model (.STL) in (2021)
Hello everyone, I've been looking for a way to show 3d models created in "ONSHAPE" for a long time. The furthest I get is thanks to the tutorial shared by the user @alan_baljeu https://youtu.be/eFIMKjFxMes * I made a few changes like: - That the .ENV file is on the project site. - server.js now takes variables from .ENV:…
-
HTML/JavaScript 3D web Viewer for OnShape
Hi, I've been working for a while on a Unity 3D component able to read 45+ 3D formats (stl, gltf, 3ds, Collada, fbx, blender, jt, ...) and I just added OnShape (Using the REST API) ! This component is developed in Unity so it can work under Windows, Linux, MacOS and especially HTML (via WebGL). It is also compatible with…
-
Regarding AddFeature API
Hi, I am trying to copy a custom feature from element in source document to an element in the target document by using API Add feature with following request body. The "feature" , "serializationVersion", "sourceMicroversion" map is same as i got from running "Get feature list" api in source document. But i am getting error…
-
What is the OAUTH authorization code lifetime ?
Hi,I am prototyping an app using the OnShape Rest API. The authorization code seems to expire shortly after it is issued, but what is its exact lifetime ?
-
Python API: 401 Unauthorised when include_mate_connectors set to true in get_assembly_def arguments
https://github.com/onshape-public/python-client/blob/master/docs/AssembliesApi.md#get_assembly_definition ^ I've been using the above code to get the assembly definition but when I set include_mate_connectors in get_assembly_definition call I get a 401 error. However it works fine if I remove them. Wondering if anyone…
-
Exporting Assemblies to Collada via the REST API?
As the title says, I'm curious if this is possible. I've been playing with the REST API Explorer for a few days now, and I can't seem to find what I'm looking for but as the documentation is a little sparse I'm just not sure if it's something I've missed. Our use-case is that we are using OnShape to develop models for…