Example: Viewing the output of Report Template execution
You can view the output of report template execution by specifying the report criteria.
The following example shows how to execute a POST request with the request body.
URI
POST: /Windchill/servlet/odata/Reporting/ExecuteReportTemplate HTTP/1.1
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 object ID of the report template. Use the following POST request with a request body.
URI
POST: /Windchill/servlet/odata/Reporting/ReportTemplates('OR:wt.query.template.ReportTemplate:214342')/PTC.Reporting.ExecuteReportTemplate HTTP/1.1
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 Criteria parameter used to filter the report results can be empty or can include multiple column constraints.