Viewing the Output of Report Template Execution
You can view the output of report template execution by specifying the report criteria in the request body.
The following example shows you how to execute the request. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/Reporting/ExecuteReportTemplate
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Name": "Legacy Report - parts",
"ContainerPath": "/",
"Criteria": [
{
"Column": "Name",
"Operator": "like",
"Value": [
"GOLF"
]
},
{
"Column": "Comments",
"Operator": "equals",
"Value": [
"OK"
]
},
{
"Column": "LastModified",
"Operator": "between",
"Value": [
"2021-09-21",
"2021-09-22"
]
}
]
}
The response returns the records that meet the report criteria.
You can also view a specific report by specifying the OID of the report template in the request URI.
* 
The Criteria parameter used to filter the report results can be empty or can include multiple column constraints.
Use the following POST URI with a request body.
URI
POST /Windchill/servlet/odata/Reporting/ReportTemplates('OR:wt.query.template.ReportTemplate:214342')/PTC.Reporting.ExecuteReportTemplate
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{

"Criteria":[]

}
The response is the report results for the specified report template.
The results are the same as the criteria information that is displayed in the Windchill user interface.
Was this helpful?