Skip to main content
6-Contributor
September 18, 2024
Solved

Search for Drawings with changed Lifecycle state via REST Endpoint

  • September 18, 2024
  • 1 reply
  • 1340 views

Hi,

 

I would like to get a List of .drw who changed the lifecycle state within the last 24 h. There is a restriction to get the information via REST Endpoint.

 

I used the PTC CAD Document management with GET CADDocuments. I tried to use the filter for the LastModified date. But there is no impact of a changed Lifecycle state to the Last modified date.

 

Any Ideas how i can filter for objects who changed their lifecycle state in a range of time?

Best answer by rhart

It can be done without customisation using InvokeIETask to invoke a ExecuteReportTemplate task.

 

Create a report using the query builder and define parameters to filter for the date, then execute the report via REST.

 

Endpoint: Windchill/servlet/odata/v1/IE/InvokeIETask

Task: com/ptc/windchill/enterprise/report/ExecuteReportTemplate2.xml

Body E.g.

 

{
"Value":"wt.query.template.ReportTemplate:664683966",
"Name":"object_ref"
}, {
"Value":"cname=" + searchString,
"Name":"input"
}

 

where cname is the name of parameter mapped to criteria in Query builder report

1 reply

rhart16-PearlAnswer
16-Pearl
September 20, 2024

It can be done without customisation using InvokeIETask to invoke a ExecuteReportTemplate task.

 

Create a report using the query builder and define parameters to filter for the date, then execute the report via REST.

 

Endpoint: Windchill/servlet/odata/v1/IE/InvokeIETask

Task: com/ptc/windchill/enterprise/report/ExecuteReportTemplate2.xml

Body E.g.

 

{
"Value":"wt.query.template.ReportTemplate:664683966",
"Name":"object_ref"
}, {
"Value":"cname=" + searchString,
"Name":"input"
}

 

where cname is the name of parameter mapped to criteria in Query builder report

HelesicPetr
22-Sapphire II
22-Sapphire II
September 20, 2024