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.
API - Folder Creation, Move Document Functionality
dirk_diggler526
Member Posts: 2 ✭
I may just be missing it in the Glassworks API explorer, but does anyone know how to create folders via API, and move documents to different folder locations via API?
Cheers,
-Dirk
0
Answers
If you look at /api/documents/{did}
the document's parentId is the folder id.
To move to another folder, modify the parentId to a different folder's ID.
To make a folder, its an undocumented API endpoint, so proceed with caution, use at your own risk, I'm not an Onshape person, etc etc..
POST /api/folders
Body:
{"name":"My new folder","ownerId":"yourCompanyId","ownerType":1,"parentId":"insertparentfolderIdhere"}
Custom FeatureScript and Onshape Integrated Applications