Previewing Changes
You can preview administrative changes for any of the created or updated object types that are supported for business administrative change promotion.
Example: Previewing Changes in an Object Initialization Rule
The following example demonstrates how to preview all the changes in an object initialization rule object type between two dates. Use the following POST URI with the request body:
URI
POST /Windchill/servlet/odata/BACMgmt/Preview HTTP/1.1
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"types": [
"OIR"
],
"startDate": "2020-09-20T00:00:00.000Z",
"endDate": "2020-10-09T00:00:00.000Z"
}
Response
The following is the response:
{
"@odata.context": "http://pwdcsv-wcqa73d.ptcnet.ptc.com/Windchill/servlet/odata/v2/BACMgmt/$metadata#Collection(PTC.BACMgmt.Delta)",
"@PTC.AppliedContainerContext.LocalTimeZone": "Asia/Calcutta",
"value": [
{
"oid": "wt.rule.TypeBasedRule:93313",
"type": "OIR",
"localizedType": "Object Initialization Rule",
"context": "Site",
"name": "Expression Alias",
"description": null,
"details": [
{
"key": "Object Type",
"value": "com.ptc.windchill.option.model.ExpressionAlias"
}
],
"modifiedDate": "2020-09-28T14:55:30Z",
"localizedModifiedDate": "2020-09-28 20:25:30 IST",
"modifiedBy": "wcadmin",
"action": "Create"
},
{
"oid": "wt.rule.TypeBasedRule:69502",
"type": "OIR",
"localizedType": "Object Initialization Rule",
"context": "Site",
"name": "Delivery Record",
"description": null,
"details": [
{
"key": "Object Type",
"value": "com.ptc.windchill.wp.delivery.DeliveryRecord"
}
],
"modifiedDate": "2020-09-28T14:54:04Z",
"localizedModifiedDate": "2020-09-28 20:24:04 IST",
"modifiedBy": "wcadmin",
"action": "Create"
},
{
"oid": "wt.rule.TypeBasedRule:168701",
"type": "OIR",
"localizedType": "Object Initialization Rule",
"context": "Site",
"name": "MPMSequence",
"description": null,
"details": [
{
"key": "Object Type",
"value": "com.ptc.windchill.mpml.processplan.sequence.MPMSequence"
}
],
"modifiedDate": "2020-09-28T15:00:22Z",
"localizedModifiedDate": "2020-09-28 20:30:22 IST",
"modifiedBy": "wcadmin",
"action": "Create"
}
]
}
Example: Previewing Changes in a Document Template
The following example demonstrates how to preview all the changes in a document template object type between two dates. In this example, the document template is created at the Site level. Use the following POST URI with the request body:
URI
POST /Windchill/servlet/odata/BACMgmt/Preview HTTP/1.1
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"types": [
"DocumentTemplate"
],
"startDate": "2022-09-26T00:00:00.000Z",
"endDate": "2022-10-27T00:00:00.000Z"
}
Response
The following is the response:
{
"@odata.context": "http://pwdcsv-wpa05d.ptcnet.ptc.com:8007/Windchill/servlet/odata/v2/BACMgmt/$metadata#Collection(PTC.BACMgmt.Delta)",
"@PTC.AppliedContainerContext.LocalTimeZone": "Asia/Calcutta",
"value": [
{
"oid": "wt.doc.WTDocument:177406",
"type": "DocumentTemplate",
"localizedType": "Document Template",
"context": "Site",
"name": "DocTempl1",
"description": "",
"details": [
{
"key": "Version",
"value": "A.1"
}
],
"modifiedDate": "2022-09-27T09:04:13Z",
"localizedModifiedDate": "2022-09-27 14:34:13 IST",
"modifiedBy": "wcadmin",
"action": "Create"
}
]
}
这对您有帮助吗?