Windchill REST Services Domain Capabilities > PTC Domains > Examples for the PTC Supplier Management Domain > Examples for the PTC Sustainability Domain > Checking In, Checking Out, Revising, or Changing the State of Engineering Materials
Checking In, Checking Out, Revising, or Changing the State of Engineering Materials
The following examples show you how to check in, check out, revise, or change the state of engineering materials.
Example: Checking In a Specific Engineering Material
This example shows you how to check in a specific engineering material. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/Sustainability/EngineeringMaterials('OR:wt.part.WTPart:594232')/PTC.Sustainability.CheckIn
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"CheckInNote": "this is a check in note"
}
Example: Checking In Multiple Engineering Materials
This example shows you how to check in two engineering material objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/Sustainability/CheckInEngineeringMaterials
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"CheckInNote": "this is a check in note",
"Workables": [
{
"ID": "OR:wt.part.WTPart:456235"
},
{
"ID": "OR:wt.part.WTPart:456285"
}
]
}
Example: Checking Out a Specific Engineering Material
This example shows you how to check out a specific engineering material. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/Sustainability/EngineeringMaterials('OR:wt.part.WTPart:594102')/PTC.Sustainability.CheckOut
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"CheckOutNote": "this is a check out note"
}
Example: Checking Out Multiple Engineering Materials
This example shows you how to check out two engineering material objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/Sustainability/CheckOutEngineeringMaterials
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"CheckOutNote": "this is a check out note",
"Workables": [
{
"ID": "OR:wt.part.WTPart:556205"
},
{
"ID": "OR:wt.part.WTPart:556295"
}
]
}
Example: Undo Checkout of a Specific Engineering Material
This example shows you how to undo the checkout of a specific engineering material. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/Sustainability/EngineeringMaterials('OR:wt.part.WTPart:594102')/PTC.Sustainability.UndoCheckOut
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
}
Example: Undo Check Out of Multiple Engineering Materials
This example shows you how to undo the checkout of two engineering material objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/Sustainability/UndoCheckOutEngineeringMaterials
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Workables": [
{
"ID": "OR:wt.part.WTPart:556205"
},
{
"ID": "OR:wt.part.WTPart:556295"
}
]
}
Example: Revising a Specific Engineering Material
This example shows you how to revise a specific engineering material. For example, if the existing revision of the object is B, the request revises the specified engineering material to revision C. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/Sustainability/EngineeringMaterials('OR:wt.part.WTPart:594102')/PTC.Sustainability.Revise
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
}
Example: Revising Multiple Engineering Materials
This example shows you how to revise two engineering material objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/Sustainability/ReviseEngineeringMaterials
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"EngineeringMaterials": [
{
"ID": "OR:wt.part.WTPart:516705"
},
{
"ID": "OR:wt.part.WTPart:526795"
}
]
}
Example: Changing the State of a Specific Engineering Material
This example shows you how to change the (life cycle) state of a specific engineering material. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/Sustainability/EngineeringMaterials('OR:wt.part.WTPart:594102')/PTC.Sustainability.SetState
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"State": {
"Value": "RELEASED"
}
}
Example: Changing the State of Multiple Engineering Materials
This example shows you how to change the (life cycle) state of two engineering material objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/Sustainability/SetStateEngineeringMaterials
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"EngineeringMaterials": [
{
"ID": "OR:wt.part.WTPart:516705"
},
{
"ID": "OR:wt.part.WTPart:526795"
}
],
"State": {
"Value": "RELEASED"
}
}
這是否有幫助?