Updating Multiple Parts
This example shows you how to update multiple parts in a single call. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/UpdateParts HTTP/1.1
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Parts": [
{
"ID":"OR:wt.part.WTPart:2200087",
"AssemblyMode":
{"Value": "inseparable"}
,
"DefaultUnit" :
{"Value": "kg"}
,
"DefaultTraceCode":
{"Value": "L"}
},
{
"ID":"OR:wt.part.WTPart:2200095",
"AssemblyMode":
{"Value": "separable"}
,
"DefaultUnit" :
{"Value": "ea"}
,
"DefaultTraceCode":
{"Value": "S"}
}
]
}
Updating Security Labels for Multiple Parts
This example shows you how to update the security label attributes for two parts specified in the request body. This example shows you how to update the security label attributes on the specified parts using the unbound action EditPartsSecurityLabels, which is automatically available in the EDM of the Parts entity. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/EditPartsSecurityLabels
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Parts": [
{
"ID": "OR:wt.part.WTPart:2200087",
"SLAttribute1": "secret1",
"SLAttribute2": "secret2"
},
{
"ID": "OR:wt.part.WTPart:2200095",
"SLAttribute1": "secret3",
"SLAttribute2": "secret4"
}
]
}
Was this helpful?