<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Part thumbnail with rest api</title><link>https://www.aras.com/community/f/development/55286/part-thumbnail-with-rest-api</link><description>I&amp;rsquo;m having trouble linking an image file uploaded to the vault to the part thumbnail using the rest api. Does anyone know what the body of a patch request needs to be to set the image file_id as the thumbnail of a part?</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Part thumbnail with rest api</title><link>https://www.aras.com/community/thread/10517?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 14:59:38 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:38fb4d2a-2320-4a44-aaff-bf1bb592d8bd</guid><dc:creator>Kradican</dc:creator><description>&lt;p&gt;Hi Angela,&lt;/p&gt;
&lt;p&gt;Thanks for the feedback. I didn&amp;#39;t realize that the &amp;quot;id&amp;quot; changes with every edit to a part, which was causing my issue with Patch requests. When I update the id to the latest version, it works with and without the&amp;nbsp;&lt;span&gt;&amp;quot;@aras.action&amp;quot;: &amp;quot;edit&amp;quot;, in the body.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kevin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Part thumbnail with rest api</title><link>https://www.aras.com/community/thread/10478?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2024 11:39:45 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:0bdec5a4-12a5-42d4-9772-4fb124b96431</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;The linked blog article is still fine, but maybe a bit dated.&lt;/p&gt;
&lt;p&gt;Have you included the aras.action inside the body?&lt;/p&gt;
&lt;p&gt;PATCH http://host/server/odata/Part(&amp;lsquo;0486&amp;hellip;23BC&amp;rsquo;) &lt;br /&gt;{ &amp;quot;@aras.action&amp;quot;: &amp;quot;edit&amp;quot;, &amp;quot;item_number&amp;quot;: &amp;quot;P-025&amp;quot; }&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Part thumbnail with rest api</title><link>https://www.aras.com/community/thread/10477?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2024 09:02:45 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:9dc4cb91-bec4-4155-a174-1ae4d4345c4a</guid><dc:creator>Kradican</dc:creator><description>&lt;p&gt;Hi Angela&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the answer.&amp;nbsp; I think I have the correct body now, but maybe the problem is with the PATCH request in general. Any updates to a part I try to make fail with the response.&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;quot;error&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;quot;code&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;BadRequest&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;quot;message&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;An Error has occurred during creating entity.&amp;quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I&amp;#39;ve also followed this blog post&amp;nbsp;&lt;a id="" href="https://aras.com/en/blog/tech-tip-using-the-aras-restful-api"&gt;https://aras.com/en/blog/tech-tip-using-the-aras-restful-api&lt;/a&gt;&amp;nbsp;and everything works as expected except the PATCH request.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I have switched to using the&amp;nbsp;Innovator.Client library instead of the rest API as a solution, however I still would like to find a solution to my issue if possible.&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I&amp;#39;m using a fresh installation of Aras Innovator Community Edition | 2024 Release.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Kevin&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Part thumbnail with rest api</title><link>https://www.aras.com/community/thread/10472?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2024 08:32:00 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:061454cb-cb06-43d2-baed-036e118c8990</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;I cannot tell you the exact body (cause it can have various formats..), but the thumbnail property behaves like every other regular property. So when you are able to edit the &amp;quot;description&amp;quot; or &amp;quot;name&amp;quot; of a Part, you should also be able to update the thumbnail.&lt;/p&gt;
&lt;p&gt;You just need to provide the correct string for the thumbnail. It contains the path to the codetree or vault directory. If you have a vaulted image, you need the file id.&lt;/p&gt;
&lt;p&gt;The content for your property looks something like this:&amp;nbsp;vault:///?fileId=123ABCDEF....&lt;/p&gt;
&lt;p&gt;Angela&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>