Skip to main content
18-Opal
June 13, 2023
Solved

Get Multiple Parts Description in a single REST API

  • June 13, 2023
  • 1 reply
  • 1751 views

Hi,

I am using the following REST API:

var WindchillData = Things["OData-connector"].getPartStructure({
 $expand: "Components($expand=Part($select=Name,Number,Version),PartUse,Occurrence;$levels=1)",
 ID: "VR:wt.part.WTPart:XXXXXXXX"
 });

As of now, I can only pass one ID. Can I pass multiple part ids in the ID field?

 

Thanks,

 

Best answer by Velkumar

Hi @pshashipreetham 

 

As far as I know, we cannot do anything on the Thingworx side.

 

You can check with your Windchill development team to create a custom API for your requirement. That might solve performance issues.

 

/VR

 

1 reply

19-Tanzanite
June 13, 2023

Hi @pshashipreetham 

 

I think it is not possible. PartID is part of the URL it won't support multiple values

 

Velkumar_0-1686644132827.png

 

/VR

18-Opal
June 14, 2023

Hi @Velkumar ,

 

Thanks for the quick response. If I want to get a Part Structure, it takes at least 5 secs. If I need to call for 40 Parts, it will take 200secs that would be around 3-4 minutes. This gives me a performance issue.

 

Thanks,

Velkumar19-TanzaniteAnswer
19-Tanzanite
June 14, 2023

Hi @pshashipreetham 

 

As far as I know, we cannot do anything on the Thingworx side.

 

You can check with your Windchill development team to create a custom API for your requirement. That might solve performance issues.

 

/VR