Skip to main content
10-Marble
February 29, 2024
Question

Getting FolderID for API

  • February 29, 2024
  • 2 replies
  • 1701 views

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

2 replies

17-Peridot
March 1, 2024

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
22-Sapphire II
March 1, 2024

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

PetrH
10-Marble
March 1, 2024

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. 

Fadel
23-Emerald I
March 17, 2026

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

Buiꓘa
OliverDroop
15-Moonstone
March 17, 2026

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
22-Sapphire II
March 17, 2026

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

PetrH