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 Posts: 1,190 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

  • andrew_kimpton_2andrew_kimpton_2 Member, Onshape Employees, Developers Posts: 72
    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 [email protected] 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 Posts: 1,190 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 Posts: 1,498 EDU
    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 - I make FeatureScripts: view FS (My FS's have "Official" beside them)
  • billy2billy2 Member, OS Professional, Mentor, Developers Posts: 1,190 PRO
    thanks, I will look for it



  • MBartlett21MBartlett21 Member Posts: 1,498 EDU
    You can use either F12 or Ctrl+Shift+I to open it
    MB - I make FeatureScripts: view FS (My FS's have "Official" beside them)
  • billy2billy2 Member, OS Professional, Mentor, Developers Posts: 1,190 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.