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.

where's the folder id's listed

billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,068 PRO
Now that we have an updated API, I'm trying update my script to include folders.

How do I get a list of folders? I need fid, where is it defined?



BTW, nice job on the new API look and feel. 

Comments

  • awkawk Member, Onshape Employees, Developers Posts: 78
    At this time the folders API is not public or documented, we're interested in hearing the types of use cases people have for folders to make sure that we have the best API support available. If you can share some details of what you're trying to do by sending an email to api-support@onshape.com we can take a look and make sure that when the public API is available it will meet your needs.
    Director of API, Appstore, and App Partner Technical Support
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,068 PRO
    edited June 2018
    That's funny, I saw that it was in the API explorer and was going to play around with it to see what it can do but got stuck at fid and couldn't figure out how to find it.

    API folders:




    Expected procedures:
    I thought I'd see a method for obtaining a list of folders. 
    A method for showing documents & folders contained inside a folder.



    I have this document loader API I wrote and have been wondering when folders would become available. Not sure what to do with them either. I suspect they'll be some kind of filter.

    Document loader:


    Let me thank about it some more.....







  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,050 ✭✭✭✭✭
    edited October 2018
    @billy2
    This is one of the API requests that Onshape does when itloads:

    https://cad.onshape.com/api/globaltreenodes/magic/1

    It returns a list of folders and documents at the top level.
    if getPathToRoot=true, it gives you a bread-crumb trail to My Onshape,

    Then to get documents and folders in a folder, use 
    https://cad.onshape.com/api/globaltreenodes/folder/[fid]

    It gives you the folders and documents on a folder

    This is from the network tab in the dev panel in chrome (open it up, then refresh the page)
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,068 PRO
    thanks, I will look for it



  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,050 ✭✭✭✭✭
    You can use either F12 or Ctrl+Shift+I to open it
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,068 PRO
    I'm chasing down an async/await error currently. Will look at it once my site starts talking to me.

    Thanks


Sign In or Register to comment.