cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

How to get subfolders via the REST API

AdamElkins
12-Amethyst

How to get subfolders via the REST API

Version: Windchill 12.1

 

Use Case: I need to traverse the folder structure in a Windchill Library via the REST API's


Description:

I see there are a few relevant API's. 

"/v6/DataAdmin/Containers('"+containerId+"')/Folders" provides us with a way to get the root folder, which I believe is pretty much always "/Default", but how do I get the list of folders in that folder, to recursively traverse the folder structure?

I see there is "/v6/DataAdmin/Containers('"+containerId+"')/Folders('"+folderId+"')" but that only gives me the information about the folder I already have the ID for and does not tell me what subfolders exist in that folder.

3 REPLIES 3
tm-4
12-Amethyst
(To:AdamElkins)

Hi,

You need to use the '$expand' param. You need to build the expand param based on the level of the folder structure. 

Example:

tm4_0-1732660962012.png

In this case the folder path is "/default/MyFolder"

 

Thanks,

Thiagarajan

 

 

Hi @AdamElkins,

 

I wanted to see if you got the help you needed.

If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Of course, if you have more to share on your issue, please pursue the conversation. 

 

Thanks,
Anurag

Still looking into it, thanks.

Announcements

Top Tags