cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Retrieve history of a Document

EG_10925009
6-Contributor

Retrieve history of a Document

Hello,

I want to retrieve maturity history and Lifecycle History of a document. How can I do this ? I did not found any endpoints in OData rest API.

8 REPLIES 8
avillanueva
22-Sapphire II
(To:EG_10925009)

Are you only looking to retrieve this via REST Api? This might need to move to Customization board. There are many ways to get this data via standard reporting if that is what you need.

Hello, thank you for answer.  I wanna retrieve maturity history and Lifecycle History of a document via just OData rest API. I dont know about custumization board. what should ı do ? 

Hi @EG_10925009 

You need to use an template report RestApi to call the report inside the Windchill.

In the Windchill you need to create report template that return what you need.

 

ExecuteReportTemplate

Viewing the output of Report Template execution

InvokeIETask with report parameter

CS378132 - Input Parameter not provided in Query Builder Report

Windchill Reporting Resource

 

PetrH

If I do this, will the endpoint I want be added to the odata rest api

Hi @EG_10925009 

You can use rest api to run any report template in the Windchill so yes the endpoint has already exists there..

You just need to create a report that retrieves the information you need in the Windchill

 

HelesicPetr_0-1713938911541.png

/Windchill/servlet/odata/Reporting/ReportTemplates('OR:wt.query.template.ReportTemplate:334133')/PTC.Reporting.ExecuteReportTemplate

HelesicPetr_1-1713938930185.png

HelesicPetr_2-1713939094307.png

 

check Windchill odata documentation

/Windchill/netmarkets/html/wrs/doc.html

 

PetrH

Thansk for answers. that's probably the solution. My company did a lot Report and   I can see that in odata rest api but all endpoints return 500 error. Other basic domains and enpoints is working bu just doesnt work report endpoints of my company. How do I fix this ? 

Hi @EG_10925009 

Who knows, It is just documentation the restapi works or contact a support to solve it.

btw use the IETask end point instead of the report one.

PetrH

Hi @EG_10925009 

There is something wrong in the code that something is null and I guess it is a specific version bug.

In windchill 12.1.2.0 the report documentation page works. 

btw the RestAPI works even though the documentation page can not loaded 

 

here is an example from the documentation

HelesicPetr_0-1713944872485.png

 

curl example for you

curl -X 'POST' \
  'http://windchillServerXY:80/Windchill/servlet/odata/v1/Reporting/ReportTemplates('\''OR%3Awt.query.template.ReportTemplate%3A334133'\'')/PTC.Reporting.ExecuteReportTemplate?%24count=false' \
  -H 'accept: application/json' \
  -H 'CSRF_NONCE: CSFRNONCESTRING' \
  -H 'Content-Type: application/json' \
  -d '{
  "Criteria": [
    {
      "Operator": "",
      "Value": [
        ""
      ],
      "Column": ""
    }
  ]
}'

PetrH

 

Announcements


Top Tags