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.

Options

/documents endpoint

Christopher_Ace_CaoileChristopher_Ace_Caoile Member Posts: 8 PRO

Is there a way to get all the documents inside a folder using this endpoint or maybe /documents/search

I know

https://cad.onshape.com/api/globaltreenodes/folder/${folderId}

allows users to get all the contents of a folder but I'm trying to avoid using this unofficial endpoint if possible. Thanks in advance

Comments

  • Caden_ArmstrongCaden_Armstrong Member Posts: 287 PRO

    The /documents endpoint has the parentId as a possible url parameter. Which is the folder id.
    https://cad.onshape.com/glassworks/explorer/#/Document/getDocuments

    But in a quick test, it looks like it isn't working. The owner property also isn't working…
    You should open a ticket with api support. According to the documentation, what you are trying to do should be possible.


    www.smartbenchsoftware.com --- fs.place --- Renaissance
    Custom FeatureScript and Onshape Integrated Applications
  • Christopher_Ace_CaoileChristopher_Ace_Caoile Member Posts: 8 PRO

    Hi Caden… I did try using the parentId but as you said, it seems to not work at the moment.. So there isn't really a way to extract these contents using /documents or /documents/search? Because I'm thinking that I may just be constructing my parameters or payload incorrectly…thanks

  • Caden_ArmstrongCaden_Armstrong Member Posts: 287 PRO

    In the past I have done this with the global tree nodes endpoint, which is obviously not recommended.

    I just tested the endpoint as documented, and yeah - something isn't working. But according to the documentation it should be. So I would suggest you email api support.

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