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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Translate the entire conversation x

Is it possible to get content of folder and subfolder using REST without OData ?

FM_13835117
6-Contributor

Is it possible to get content of folder and subfolder using REST without OData ?

Version: Windchill 12.1

 

Use Case: I would like to list all items of a selected folder, then to extract all documents related to the selected item


Description:

I've found several solutions using Odata, but I don't succeed to rerpoduce the same requests. And I would prefer to use REST queries to get result formated in json. Does the REST API can give access to all data that are accessible from the user web interface ?
Thanks for any help.

Fred

 

Context: Although the product version is 12.1.2.0, the REST Services version is 2.3.

3 REPLIES 3

I get the content of folder with the OData request :

https://<url>/Windchill/servlet/odata/v5/DataAdmin/Containers('OR:wt.pdmlink.PDMLinkProduct:681234555')/Folders('OR:wt.folder.Cabinet:681234597')/Folders('OR:wt.folder.SubFolder:681267970')/Folders('OR:wt.folder.SubFolder:681267975')/FolderContents

and because of the error message : "The returned query result has exceeded the query limit, and only 50,000 result returned.I try to limit the number of results by using the 'top' filter :

https://<url>/Windchill/servlet/odata/v5/DataAdmin/Containers('OR:wt.pdmlink.PDMLinkProduct:681234555')/Folders('OR:wt.folder.Cabinet:681234597')/Folders('OR:wt.folder.SubFolder:681267970')/Folders('OR:wt.folder.SubFolder:681267975')/FolderContents?$top=10

but it doesn't work, the result is the same.
Does anyone knows if it is an issue due to the old version of the rest api that I use ?
Thanks for any help
Fred

HelesicPetr
22-Sapphire II
(To:FM_13835117)

Hi @FM_13835117 

I would suspect that the query result limit is a limit set for the database in general. 

You can try to change the limit, but it can case some performance issue if user starts a report without criteria or advance search with week criteria as last modified on by date with an ending actual day >D

it can case very huge database load and can case a crash of method server based on low memory. 

 

btw you can try to change the limit by following article CS26116 - The returned query result has exceeded the query limit

 

PetrH

Hi @FM_13835117,

 

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 
 

Announcements

Top Tags