Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
[ISSUE] Exporting STL with modified configuration
remi_beges
Member Posts: 6 ✭
in General
I'm trying to export STL of a part with modified values for a few configuration variables, using Rest API with a python script.
My code builds the following URL to request modified STL:
The URL looks correct, I've generated the query params using the encoding endpoint:
https://cad.onshape.com/api/elements/d/78a4512a42e4ca0851f608fd/e/f8106d3c4c49847c17cca944/configurationencodings
-> {'encodedId': 'DiametrePlateau=1200;Pieds_LargeurEncoches=60', 'queryParam': 'configuration=DiametrePlateau%3D1200%3BPieds_LargeurEncoches%3D60'}
-> {'encodedId': 'DiametrePlateau=1200;Pieds_LargeurEncoches=60', 'queryParam': 'configuration=DiametrePlateau%3D1200%3BPieds_LargeurEncoches%3D60'}
However, calling the STL endpoint returns 204 no content, and the returned text is empty.
Removing the query configuration and using default config returns 200 with the proper STL.
Why is OnShape API returning 204 instead of the correct STL ?
Tagged:
0
Comments
https://cad.onshape.com/api/partstudios/d/f97b224eed8484e4e4df703d/v/46fa8915d81f1c859013e1fb/e/f8ea33aea606bb46c0db5862/stl?configuration=size%3D100000000%2Bmeter
And the same call, but with a valid size specified returning a 200 with the stl:
https://cad.onshape.com/api/partstudios/d/f97b224eed8484e4e4df703d/v/46fa8915d81f1c859013e1fb/e/f8ea33aea606bb46c0db5862/stl?configuration=size%3D0.01%2Bmeter
We're planning to make these errors more informative in the near future.
Hope that helps!