<?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: Error on Create Thing service, when accessed via postman in ThingWorx Developers</title>
    <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Error-on-Create-Thing-service-when-accessed-via-postman/m-p/724766#M51636</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DavorGranic_0-1618580816269.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/40550iDE2E9D16F77D81F6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DavorGranic_0-1618580816269.png" alt="DavorGranic_0-1618580816269.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I can trigger other services but only this one with create thing wont work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Seems that thing that gets created has no permissions needed for that user to restart it in service.&lt;/P&gt;
&lt;P&gt;It creates thing(when I start it with admin user in Thingworx) but not with needed permissions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Apr 2021 13:49:35 GMT</pubDate>
    <dc:creator>DavorGranic</dc:creator>
    <dc:date>2021-04-16T13:49:35Z</dc:date>
    <item>
      <title>Error on Create Thing service, when accessed via postman</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Error-on-Create-Thing-service-when-accessed-via-postman/m-p/724710#M51624</link>
      <description>&lt;P&gt;I have simple create Thing service that works fine when I test it in Thingworx.&lt;/P&gt;
&lt;P&gt;But when trigered via postman it returns error:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"&lt;SPAN style="font-family: inherit;"&gt;TypeError&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;&amp;nbsp;Cannot&amp;nbsp;call&amp;nbsp;method&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;"CreateThing"&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;&amp;nbsp;of&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;null"&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Permissions seem not to be the problem. Im guessing its something simple but im stumped.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;If anyone has an idea &lt;SPAN&gt;it would be greatly appreciated&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Service code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;SPAN style="font-family: inherit;"&gt;var nameThing="TestThing";&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;params = {&lt;BR /&gt;name: nameThing,&lt;BR /&gt;description: "This Is A New Thing",&lt;BR /&gt;thingTemplateName: "GenericThing",&lt;BR /&gt;projectName:'PMI Demo',&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;Resources["EntityServices"].CreateThing(params);&lt;BR /&gt;Things[nameThing].EnableThing();&lt;BR /&gt;Things[nameThing].RestartThing();&lt;BR /&gt;result="Ok";&lt;BR /&gt;}&lt;BR /&gt;catch (err) {&lt;BR /&gt;result="Not Ok";&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 09:21:29 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Error-on-Create-Thing-service-when-accessed-via-postman/m-p/724710#M51624</guid>
      <dc:creator>DavorGranic</dc:creator>
      <dc:date>2021-04-16T09:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Create Thing service, when accessed via postman</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Error-on-Create-Thing-service-when-accessed-via-postman/m-p/724732#M51629</link>
      <description>&lt;P&gt;if you are sure that the app key(user) which is passed when you execute this via Postman does have permission to execute this service on ThingWorx, then it should be something in your Postman request itself. I hope you are doing a POST call on the endpoint like &lt;A href="https://host:port/Thingworx/Things" target="_blank"&gt;https://host:port/Thingworx/Things/TestThing/Service/YourServiceName.&amp;nbsp;&lt;/A&gt;&lt;BR /&gt;I tried the same snippet posted by you in the question and I am able to call it from Postman as well. If possible share what you are sending via postman.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 11:59:38 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Error-on-Create-Thing-service-when-accessed-via-postman/m-p/724732#M51629</guid>
      <dc:creator>mnarang</dc:creator>
      <dc:date>2021-04-16T11:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Create Thing service, when accessed via postman</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Error-on-Create-Thing-service-when-accessed-via-postman/m-p/724766#M51636</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DavorGranic_0-1618580816269.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/40550iDE2E9D16F77D81F6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DavorGranic_0-1618580816269.png" alt="DavorGranic_0-1618580816269.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I can trigger other services but only this one with create thing wont work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Seems that thing that gets created has no permissions needed for that user to restart it in service.&lt;/P&gt;
&lt;P&gt;It creates thing(when I start it with admin user in Thingworx) but not with needed permissions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 13:49:35 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Error-on-Create-Thing-service-when-accessed-via-postman/m-p/724766#M51636</guid>
      <dc:creator>DavorGranic</dc:creator>
      <dc:date>2021-04-16T13:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Create Thing service, when accessed via postman</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Error-on-Create-Thing-service-when-accessed-via-postman/m-p/725291#M51671</link>
      <description>&lt;P&gt;Giving collective permissions to user made it work. Permissions on template or service were not enough it seems.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 11:02:30 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Error-on-Create-Thing-service-when-accessed-via-postman/m-p/725291#M51671</guid>
      <dc:creator>DavorGranic</dc:creator>
      <dc:date>2021-04-20T11:02:30Z</dc:date>
    </item>
  </channel>
</rss>

