Skip to main content
7-Bedrock
August 28, 2019
Solved

Windchill REST Services 1.5 - $levels working?

  • August 28, 2019
  • 1 reply
  • 2228 views

Hi everyone,

 

I was playing around with WRS 1.5 with the help of "Windchill REST Services Userโ€™s Guide 1.5", using SoapUI and a Windchill 11.1 M020 CPS05 instance.

 

I am aware that GetBOM might be deprecated in future, however my question might be relevant also for other REST methods.

On page 166 there is written the following:

Reading the Bill of Material (BOM)
This example shows you how to read the bill of material (BOM) for a product
structure. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:44148884')/
PTC.ProdMgmt.GetBOM?$expand=Components($expand=Part($select=Name,Number),
PartUse,Occurrences;$levels=max) HTTP/1.1
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{NavigationCriteria={"ID":"OR:wt.filter.NavigationCriteria:186213"}}

I used that example, without giving a NavigationCriteria (thus the Request Body was {}.

However I found out that when I have "$levels=max" in, I always get

{"error": {
 "code": null,
 "message": "The URI is malformed."
}}

as a response. Even when replacing max by 1 or 2. When I take it out, everything works fine with all levels.

Question: is that a known behaivour? If so, what should be used instead of $levels?

 

Thank you in advance,

Harald

Best answer by hfiedler

Had been resolved.

1 reply

hfiedler7-BedrockAuthorAnswer
7-Bedrock
December 19, 2019

Had been resolved.