Windchill REST Services Domain Capabilities > Examples for Basic REST Operations > Examples for the PTC BOM Transformation Domain > Example: Checking in/Checking Out and Changing the State of Extended Data Objects
Example: Checking in/Checking Out and Changing the State of Extended Data Objects
These examples show how to check in, check out and perform state change operations on Extended Data objects:
Checking out an Extended Data Object
The following example shows how you can check out an extended data object using the following POST URI with the request boy. You must specify the checkoutnote in the request body.
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
URI
POST Windchill/servlet/odata/BomTransformation/ExtendedDatas('{ExtendedDataId}')/PTC.BomTransformation.CheckOut
Request Body
{
"CheckOutNote": "Checked out"
}
Undo Checkout of an Extended Data Object
This example shows you how to undo check out of Extended Data objects. Use the POST URI.
URI
POST Windchill/servlet/odata/BomTransformation/ExtendedDatas('{ExtendedDataId}')/PTC.MfgProcMgmt.UndoCheckOut
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Checking in an Extended Data Object
The following example shows how you can check in an extended data object using the following POST URI with the request body.
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
URI
POST Windchill/servlet/odata/BomTransformation/ExtendedDatas('<ExtendedDataId>')/PTC.BomTransformation.CheckIn
Request Body
{
"KeepCheckedOut": "false",
"CheckInNote": "check in",
"CheckOutNote": ""
}
Changing the State of an Extended Data Object
The following example shows how you can change the (life cycle) state of a specific extended data object. Use the following POST URI with the request body. In this example the state is specified in the request body.
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
URI
POST Windchill/servlet/odata/BomTransformation/ExtendedDatas('<ExtendedDataId>')/PTC.BomTransformation.SetState
Request Body
{
"State": {
"Value": "INWORK",
"DISPLAY": "In Work"
}
}