Creating a Part
This example shows you how to create a part. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/Parts HTTP/1.1
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Name": "TestWTPart_001",
"AssemblyMode": {
"Value": "separable",
"Display": "Separable"
},
"PhantomManufacturingPart": false,
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:48507000')"
}
Example: Creating a Part with Security Labels
This example shows you how to create a part with security labels. In this example, two standard security label attributes, SecrecyLabel and SL10, one custom security label attribute NTK, and one multi-valued security label attribute ExportControl are specified in the request body along with the other attributes. Use the following POST URI with the request body.
* 
To set the values of the standard security label attributes which are available in the EDM of the entity, you must specify the internal names of their values in the request body.
You can specify unrestricted (standard and custom) or restricted security label attributes in the request body.
If restricted security label attributes are specified or if the access to an entity is restricted, the request creates the entity object in Windchill, but the response does not contain the entity.
URI
POST /Windchill/servlet/odata/ProdMgmt/Parts HTTP/1.1
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Name": "TestWTPart_001",
"AssemblyMode": {
"Value": "separable",
"Display": "Separable"
},
"SecrecyLabel": "Secret",
"SL10": "v1",
"NTK": "value1",
"ExportControl": "US_ITAR,UK_ITAR",
"PhantomManufacturingPart": false,
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:48507000')"
}
¿Fue esto útil?