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

How to retrieve documents information on WTPart using WTPart ID?

rgurram
8-Gravel

How to retrieve documents information on WTPart using WTPart ID?

I have a WTPart ID "OR:wt.part.WTPart:4911695"

I have DescribedBy and Reference Documents associated with it. How to retrieve the documents information using the part id or WTPartDescribeLink or  WTPartReferenceLink? What does the EndPoint URL look like? 

ACCEPTED SOLUTION

Accepted Solutions
amarsingh
12-Amethyst
(To:rgurram)

This REST call will give what you are looking for

GET <windchill_server>:<port>/Windchill/servlet/odata/ProdMgmt/Parts('part_id')?$expand=DescribedBy($expand=DescribedBy),References($expand=References)

View solution in original post

4 REPLIES 4
DMMartins
4-Participant
(To:rgurram)

Hello,

 

I'm not sure if I understood well your question. To retrieve the described by/reference documents you can access the 'Related Objects' tab, tables: Described By/Reference Documents of the Part you want.

No URL will give you that type of information. On the other hand, you could create a SQL statement to pass your WTPart ID and join the describe by and reference tables to retrieve such information.  

 

Best regards,

Diogo Martins

 

kfreydl
12-Amethyst
(To:rgurram)

Hi

The Windchill REST API can be used to retrieve all drawings of a particular part.

Example

https://windchill.acme.com/Windchill/servlet/rest/structure/drawings/OR%3Awt.part.WTPart%3A102799?useParts=true

Result

{
"items": [{
"id": "OR:wt.epm.EPMDocument:102871",
"typeId": "WCTYPE|wt.epm.EPMDocument"
}]
}

Currently, I do not know if there is a way to get other documents than drawings with REST.

Kurt

amarsingh
12-Amethyst
(To:rgurram)

This REST call will give what you are looking for

GET <windchill_server>:<port>/Windchill/servlet/odata/ProdMgmt/Parts('part_id')?$expand=DescribedBy($expand=DescribedBy),References($expand=References)
rleir
17-Peridot
(To:amarsingh)

@amarsingh  @rgurram 

Amar, it has been a long time and I am on WC 12.0.2 but maybe this can still work. However, I am getting an error:

Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:4299999929')?$expand=DescribedBy($expand=DescribedBy),References($expand=References) <Response [500]>
Warn:  {"error":{"code":null,"message":"JS Error ReferenceError -- \"SessionHelper\" is not defined"}}

What is going wrong? How can I define SessionHelper for this?

thanks

Rick

Announcements


Top Tags