Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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

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

Answers

  • Caden_ArmstrongCaden_Armstrong Member Posts: 195 PRO

    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"}

    www.smartbenchsoftware.com --- fs.place --- Renaissance
    Custom FeatureScript and Onshape Integrated Applications
Sign In or Register to comment.