<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: URLTemplateAction could generate JSON in Windchill</title>
    <link>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750625#M64832</link>
    <description>&lt;PRE&gt;curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'CSRF_NONCE: mynonce' -d '{"Task":"com/ptc/windchill/enterprise/report/ExecuteReportTemplate.xml","Params":[{"Value":"wt.query.template.ReportTemplate:603747175","Name":"object_ref","ValueSet":[]}]}' 'http://mywindchillserver/Windchill/servlet/odata/v1/IE/InvokeIETask?%24count=false'&lt;/PRE&gt;</description>
    <pubDate>Wed, 29 Sep 2021 10:09:22 GMT</pubDate>
    <dc:creator>rhart</dc:creator>
    <dc:date>2021-09-29T10:09:22Z</dc:date>
    <item>
      <title>URLTemplateAction could generate JSON</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750367#M64820</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;
&lt;P&gt;When you run a report from a URL using&amp;nbsp;URLTemplateAction you have the option of getting the results in CSV, XML, or HTML formats:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.ptc.com/help/wnc/r12.0.2.0/en/#page/Windchill_Help_Center%2FWCCG_BusLogicCust_ReportGeneration_CustDetails.html%23" target="_blank"&gt;https://support.ptc.com/help/wnc/r12.0.2.0/en/#page/Windchill_Help_Center%2FWCCG_BusLogicCust_ReportGeneration_CustDetails.html%23&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;But it is 2021, how about the JSON format? Yes I know I could write some XSLT and do this myself.. It looks as if I will need to parse the XML.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Rick&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 16:15:21 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750367#M64820</guid>
      <dc:creator>rleir</dc:creator>
      <dc:date>2021-09-27T16:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: URLTemplateAction could generate JSON</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750368#M64821</link>
      <description>&lt;P&gt;I've thought this too - it would be a nice addition to the output types.&amp;nbsp; Depends on what your end goal is and where the users are going to interact with the data.&amp;nbsp; But if you want JSON you're going to have to use the REST APIs as far as I know.&amp;nbsp; If I use Query Builder I now am using CSV output and I read this direct into PowerBI. I used to use XML but the CSV is way cleaner, faster, and less error prone.&amp;nbsp; XML always has some issues with data types changing on enumerations and also with invalid hex characters.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 16:21:39 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750368#M64821</guid>
      <dc:creator>aaronjlarson</dc:creator>
      <dc:date>2021-09-27T16:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: URLTemplateAction could generate JSON</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750376#M64822</link>
      <description>&lt;P&gt;Aaron&lt;/P&gt;
&lt;P&gt;Agreed, CSV or TSV is quick and simple. But we have field values containing line breaks, and that problem gets messy.&lt;/P&gt;
&lt;P&gt;Yes, the REST API's...&amp;nbsp; &amp;nbsp;I have done some work with them but could not access all the tables that QB could see. It seemed that development would be quicker if I run a report. Next I will see if WC provides a usable Excel format via&amp;nbsp;excel2000WebQuery.xsl or&amp;nbsp;excel97WebQuery.xsl.&lt;/P&gt;
&lt;P&gt;Thanks -- Rick&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 16:59:51 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750376#M64822</guid>
      <dc:creator>rleir</dc:creator>
      <dc:date>2021-09-27T16:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: URLTemplateAction could generate JSON</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750382#M64823</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/310062"&gt;@rleir&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Another option is to run the query builder report using REST, there’s two ways. The report can be Invoked from an IE task or a Generate-Report’ webject action can be invoked directly from REST, both return a JSON or XML object containing the results and you can pass parameter to the query using ‘INPUT’ params from REST. You also have some extras like running two or more reports and getting both results in the same output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.ptc.com/help/windchill/wc111_hc/whc_en/index.html#page/Windchill_Help_Center%2FWC_WebjectLib_GenerateReport_PARAMETERS27.html%23" target="_blank"&gt;http://support.ptc.com/help/windchill/wc111_hc/whc_en/index.html#page/Windchill_Help_Center%2FWC_WebjectLib_GenerateReport_PARAMETERS27.html%23&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 18:17:32 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750382#M64823</guid>
      <dc:creator>rhart</dc:creator>
      <dc:date>2021-09-27T18:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: URLTemplateAction could generate JSON</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750488#M64826</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/205208"&gt;@rhart&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Would you be able to show me an example using&amp;nbsp;&lt;SPAN&gt;a Generate-Report’ webject action, invoked directly from REST please? I have explored the link you showed, and I have looked into $domain/Windchill/netmarkets/html/wrs/doc.html, and neither seems to show how to do it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rick&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 12:22:44 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750488#M64826</guid>
      <dc:creator>rleir</dc:creator>
      <dc:date>2021-09-28T12:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: URLTemplateAction could generate JSON</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750521#M64827</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/310062"&gt;@rleir&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Looking at the wrs documentation area, here's how to produce a working example.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I attached a video but you might have to wait for a moderator to clear it before you can watch.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6274604235001w1096h540r803" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6274604235001" data-account="6058022026001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6058022026001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6274604235001w1096h540r803');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://www.ptcusercommunity.com/t5/video/gallerypage/video-id/6274604235001"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 15:51:02 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750521#M64827</guid>
      <dc:creator>rhart</dc:creator>
      <dc:date>2021-09-28T15:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: URLTemplateAction could generate JSON</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750621#M64831</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/205208"&gt;@rhart&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lots of the PTC doco assumes that I am using JSP and never shows a full URL. But no, think Python or Ruby or curl or Excel Macro VBA. An example URL that starts &lt;SPAN&gt;a Generate-Report webject action&amp;nbsp;&lt;/SPAN&gt;would be appreciated!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A video is nice thanks but just write a single line of text please.&lt;/P&gt;
&lt;P&gt;cheers -- Rick&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 10:01:35 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750621#M64831</guid>
      <dc:creator>rleir</dc:creator>
      <dc:date>2021-09-29T10:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: URLTemplateAction could generate JSON</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750625#M64832</link>
      <description>&lt;PRE&gt;curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'CSRF_NONCE: mynonce' -d '{"Task":"com/ptc/windchill/enterprise/report/ExecuteReportTemplate.xml","Params":[{"Value":"wt.query.template.ReportTemplate:603747175","Name":"object_ref","ValueSet":[]}]}' 'http://mywindchillserver/Windchill/servlet/odata/v1/IE/InvokeIETask?%24count=false'&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Sep 2021 10:09:22 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/URLTemplateAction-could-generate-JSON/m-p/750625#M64832</guid>
      <dc:creator>rhart</dc:creator>
      <dc:date>2021-09-29T10:09:22Z</dc:date>
    </item>
  </channel>
</rss>

