Start a topic
With the exception of Windchill, The PTC Community is on read-only status until April 6 in preparation for moving our community to a new platform. Learn more here
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The PTC Community is on temporary read only status in preparation for moving our community to a new platform. Learn more here

Translate the entire conversation x

Getting FolderID for API

VH_10947268
10-Marble

Getting FolderID for API

How do I get the folder ID? Right now I am trying to use the Windchill REST Services site where it generates the request and response for you. I assume that under the data administration domain you can get folders from a container using /Containers{'ContainerID'}'/Folders but it seems like none of the folders show up when I provide the ContainerID for an organization. Windchill Version 12.1.2.0 and REST API 2.5

8 REPLIES 8

Hello @VH_10947268 

Is there an issue with the input parameters?

ContainerID should be like OR:wt.inf.container.OrgContainer:123456789

It works on my server

Rocket_Max_0-1709262061408.png

Rocket_Max_1-1709262086612.png

 

 

HelesicPetr
22-Sapphire II
(To:Rocket_Max)

Hi @Rocket_Max 

The point is what he expects. 

Your result is a folder in the Organization folder structure? 

 

I guess that @VH_10947268 expects if he request for folders under organization he would get all folders from all sub containers as the libraries and products and that way I guess it does not work. 

 

PetrH

Thanks for responses, @Rocket_Max @HelesicPetr 

I’m not sure what a FolderID is exactly supposed to look like, but what I’m guessing is that if I have folders in a organization, I can provide the organization’s ContainerID and get all the folders’ IDs inside that organization. I’m not exactly sure what a Cabinet is, but maybe that is the FolderID? But I have multiple folders in that container and only one CabinetID shows up so I’m guessing not. Maybe I need to get folders as use the cabinetID as the container? I’m trying to figure out this because you can provide Folder@odata.bind in the API when creating documents, and I’m guessing it will create a document at that folder. 

Hello,
I have same issue, The found folder is always the default folder under a Product (Context).
I cannot find the way to get the other folders ID.
I'm able to create one folder, its ID is not a cabinet
(i.e.: OR:wt.folder.Cabinet:789280659)
but a subfolder
(i.e.: OR:wt.folder.SubFolder:3178054303)

It looks that the get method /Containers('{ContainerId}')/Folders, Get Folder send back only Cabinet,
But I cannot find the way to get the subfolder ID

If you have an idea it will be great

use Folders($levels=max) in expand

Fadel
23-Emerald I
(To:VH_10947268)

you can get the folder/context Id from URL as easiest way :

ids.png 

Adwanced you can make a QML report and run it over REST to get product IDs and use existing Rest endPoint to get folder Ids

Fede
OliverDroop
15-Moonstone
(To:Fadel)

You need to get it dynamically by API and not hardcoded.

Creating a QML which I need to deploy first before I can use a REST call is not straight forward neither

HelesicPetr
22-Sapphire II
(To:OliverDroop)

Hi @OliverDroop 

Nothing is straight forward in windchill 😄

It is a way. 

Another way is to create own RestAPI and search the object by your code and return the oid 

PetrH

Announcements


Top Tags