<?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: Using REST API to get a list of all WTParts in Windchill</title>
    <link>https://www.ptcusercommunity.com/t5/Windchill/Using-REST-API-to-get-a-list-of-all-WTParts/m-p/861619#M70669</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes this is a silly problem that we're also struggling with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So ther requirement is to give Windchill a list of part number and then it needs to bring properties back of all the WTparts that was listed&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Tried it via a saved Search Query endpoints supplying part number via KeyWord parameter but for some reasons it omits some parts in the response so doing it via SavedSearch End Point does not work correct. If I run the exact save query in Windchill Front end I get correct list:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;https://&amp;lt;Wchillhost&amp;gt;/Windchill/servlet/odata/v4/SavedSearch/SavedQueries('&lt;STRONG&gt;OR%3Awt.query.SavedQuery%3A1294983587')/PTC.SavedSearch.ExecuteSavedSearch(Keyword='BN064295%3BBN064517_01%3BBN067254%3BBN067255%3BBN067521%3BBN067521-01%3BBN067521-02%3BBN067521-04%3BBN067521-04001%3BBN067794%3BBN067796%3BBN067797%3BBN067797-01%3BBN067797-02%3BBN067797-03%3BBN067797-04%3BBN067799%3BBN067799-01%3BBN067831%3BBN067833%3BBN067837%3BBN067840%3BBN067842%3BBN067848&lt;/STRONG&gt;')&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Is it possible to get WTParts out of Windchill with Rest API specifiying the list of WT parts?&lt;/P&gt;</description>
    <pubDate>Tue, 14 Mar 2023 09:31:43 GMT</pubDate>
    <dc:creator>ldutoit</dc:creator>
    <dc:date>2023-03-14T09:31:43Z</dc:date>
    <item>
      <title>Using REST API to get a list of all WTParts</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Using-REST-API-to-get-a-list-of-all-WTParts/m-p/780404#M66102</link>
      <description>&lt;P&gt;Is there a way to use the rest api to get a list of all wtparts and their attributes?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 23:19:14 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Using-REST-API-to-get-a-list-of-all-WTParts/m-p/780404#M66102</guid>
      <dc:creator>PhilK</dc:creator>
      <dc:date>2022-02-23T23:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using REST API to get a list of all WTParts</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Using-REST-API-to-get-a-list-of-all-WTParts/m-p/781228#M66136</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/272599"&gt;@PhilK&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can get parts and their attributes but there does seem to be a limit for how many parts in a single query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can get 140,000 parts with query for a part Numbers containing 'M', but if I make the criteria and broader I get an error, so suspecting the limit is 200,000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;https://&amp;lt;mywindchillhost&amp;gt;/Windchill/servlet/odata/v5/ProdMgmt/Parts?$filter=contains(Number%2C'M')&amp;amp;$count=false&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 15:08:07 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Using-REST-API-to-get-a-list-of-all-WTParts/m-p/781228#M66136</guid>
      <dc:creator>rhart</dc:creator>
      <dc:date>2022-02-28T15:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using REST API to get a list of all WTParts</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Using-REST-API-to-get-a-list-of-all-WTParts/m-p/861619#M70669</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes this is a silly problem that we're also struggling with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So ther requirement is to give Windchill a list of part number and then it needs to bring properties back of all the WTparts that was listed&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Tried it via a saved Search Query endpoints supplying part number via KeyWord parameter but for some reasons it omits some parts in the response so doing it via SavedSearch End Point does not work correct. If I run the exact save query in Windchill Front end I get correct list:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;https://&amp;lt;Wchillhost&amp;gt;/Windchill/servlet/odata/v4/SavedSearch/SavedQueries('&lt;STRONG&gt;OR%3Awt.query.SavedQuery%3A1294983587')/PTC.SavedSearch.ExecuteSavedSearch(Keyword='BN064295%3BBN064517_01%3BBN067254%3BBN067255%3BBN067521%3BBN067521-01%3BBN067521-02%3BBN067521-04%3BBN067521-04001%3BBN067794%3BBN067796%3BBN067797%3BBN067797-01%3BBN067797-02%3BBN067797-03%3BBN067797-04%3BBN067799%3BBN067799-01%3BBN067831%3BBN067833%3BBN067837%3BBN067840%3BBN067842%3BBN067848&lt;/STRONG&gt;')&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Is it possible to get WTParts out of Windchill with Rest API specifiying the list of WT parts?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 09:31:43 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Using-REST-API-to-get-a-list-of-all-WTParts/m-p/861619#M70669</guid>
      <dc:creator>ldutoit</dc:creator>
      <dc:date>2023-03-14T09:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using REST API to get a list of all WTParts</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Using-REST-API-to-get-a-list-of-all-WTParts/m-p/861798#M70676</link>
      <description>&lt;P&gt;You can use a QB parameter and pass in a part number, then QB can report the attributes that you need. Use a python script to call this QB report repeatedly, once per part.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The python script is not difficult, but I don't have time at the moment to give the details.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 17:45:18 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Using-REST-API-to-get-a-list-of-all-WTParts/m-p/861798#M70676</guid>
      <dc:creator>rleir</dc:creator>
      <dc:date>2023-03-14T17:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using REST API to get a list of all WTParts</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Using-REST-API-to-get-a-list-of-all-WTParts/m-p/861889#M70681</link>
      <description>&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 07:02:28 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Using-REST-API-to-get-a-list-of-all-WTParts/m-p/861889#M70681</guid>
      <dc:creator>ldutoit</dc:creator>
      <dc:date>2023-03-15T07:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using REST API to get a list of all WTParts</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Using-REST-API-to-get-a-list-of-all-WTParts/m-p/861911#M70683</link>
      <description>&lt;P&gt;Something like this to run a QB report:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;        # returns TSV or XML or XSL text

        static_p = ('servlet/WindchillAuthGW/wt.enterprise.URLProcessor/'
                    'URLTemplateAction?'
                    'Item+Name=Foo-T%2A&amp;amp;'
                    'format=formatCustom&amp;amp;'
                    'xsl2=&amp;amp;'
                    'SET_QUERY_LIMIT=20000&amp;amp;')

        if format == 'XML':
            format_xsl = 'identity.xsl'
        elif format == 'TSV':
            format_xsl = 'tsvFormat.xsl'
 
        sURL = self.wc_url + static_p
        sURL += ('xsl1=templates/reports/'
                 + format_xsl + '&amp;amp;'
                 + 'oid=OR%3Awt.query.template.ReportTemplate%3A'
                 + str(report_ID) + '&amp;amp;'
                 + parm_txt
                 + 'action=ExecuteReport')

        return self.send_to_Windchill(sURL, expect_JSON=False)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;parm_txt = 'PartNumber=' + p_number + '&amp;amp;'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I find the TSV format more useful. cheers -- R&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 09:58:12 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Using-REST-API-to-get-a-list-of-all-WTParts/m-p/861911#M70683</guid>
      <dc:creator>rleir</dc:creator>
      <dc:date>2023-03-15T09:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using REST API to get a list of all WTParts</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Using-REST-API-to-get-a-list-of-all-WTParts/m-p/862592#M70717</link>
      <description>&lt;P&gt;Thank you very much!! I will try it&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 10:38:58 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Using-REST-API-to-get-a-list-of-all-WTParts/m-p/862592#M70717</guid>
      <dc:creator>ldutoit</dc:creator>
      <dc:date>2023-03-17T10:38:58Z</dc:date>
    </item>
  </channel>
</rss>

