<?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: post request for service doesnt work in ThingWorx Developers</title>
    <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/post-request-for-service-doesnt-work/m-p/991450#M68762</link>
    <description>&lt;P&gt;More about this error:&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;"&lt;STRONG&gt;Thing Service returns "500 Unexpected Error - Contact your system administrator for more"&lt;/STRONG&gt;":&amp;nbsp;&lt;A href="https://community.ptc.com/t5/ThingWorx-Developers/Thing-Service-returns-quot-500-Unexpected-Error-Contact-your/td-p/672334" target="_blank"&gt;https://community.ptc.com/t5/ThingWorx-Developers/Thing-Service-returns-quot-500-Unexpected-Error-Contact-your/td-p/672334&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;"&lt;STRONG&gt;500 Unexpected Error - Contact your system administrator for more details" is seen after logging into Composer on ThingWorx Platform"&lt;/STRONG&gt;": &lt;A href="https://www.ptc.com/en/support/article/CS355687" target="_blank"&gt;https://www.ptc.com/en/support/article/CS355687&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Thu, 02 Jan 2025 13:58:56 GMT</pubDate>
    <dc:creator>VladimirN</dc:creator>
    <dc:date>2025-01-02T13:58:56Z</dc:date>
    <item>
      <title>post request for service doesnt work</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/post-request-for-service-doesnt-work/m-p/991396#M68758</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am trying to work with the thingworx api , i can do GET request to get properties values and it is fine but when i tried to test the POST request to run a service, it doesn't work , although the service itself works fine it has no inputs and it output the data in infotable (it has QueryPropertyHistory service in it, that returns the infotable)&lt;/P&gt;&lt;P&gt;and i am testing the api locally with this links (i double checked the names)&lt;BR /&gt;&lt;A href="http://localhost/Thingworx/Things/Eastern.Security.Vehicle.5971/Services/TestQueryData" target="_blank"&gt;http://localhost/Thingworx/Things/Eastern.Security.Vehicle.5971/Services/TestQueryData&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;i am also using API key in postman header and it works fine when i do get property,&lt;BR /&gt;&lt;BR /&gt;her is the error i get in the post man&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;

&amp;lt;head&amp;gt;
	&amp;lt;title&amp;gt;Unexpected Error&amp;lt;/title&amp;gt;
	&amp;lt;script&amp;gt;
		function clickAndDisable(link) {
              link.onclick = function(event) {
                event.preventDefault();
              }
            }
	&amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
	&amp;lt;div class="widget-panel widget-container widget-content" style="overflow: auto;"&amp;gt;
		&amp;lt;div class="widget-content widget-image undefined" id="error_Image-1"&amp;gt;
			&amp;lt;img src="/Thingworx/images/ThingworxLogo.png" alt="Errors"/&amp;gt;
      &amp;lt;/div&amp;gt;
		&amp;lt;/div&amp;gt;
		&amp;lt;div id="error_Panel-1"&amp;gt;
			&amp;lt;p&amp;gt;500 Unexpected Error - Contact your system administrator for more details&amp;lt;/p&amp;gt;
			&amp;lt;a href="/Thingworx" onclick='clickAndDisable(this);'&amp;gt;Back to Composer&amp;lt;/a&amp;gt;
		&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;also i tried to check the monitor window in the composer under script log i cant see any errors or indications that the script or the service has been executed&lt;BR /&gt;&lt;BR /&gt;thank you,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 10:03:21 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/post-request-for-service-doesnt-work/m-p/991396#M68758</guid>
      <dc:creator>IA_10816220</dc:creator>
      <dc:date>2025-01-02T10:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: post request for service doesnt work</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/post-request-for-service-doesnt-work/m-p/991450#M68762</link>
      <description>&lt;P&gt;More about this error:&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;"&lt;STRONG&gt;Thing Service returns "500 Unexpected Error - Contact your system administrator for more"&lt;/STRONG&gt;":&amp;nbsp;&lt;A href="https://community.ptc.com/t5/ThingWorx-Developers/Thing-Service-returns-quot-500-Unexpected-Error-Contact-your/td-p/672334" target="_blank"&gt;https://community.ptc.com/t5/ThingWorx-Developers/Thing-Service-returns-quot-500-Unexpected-Error-Contact-your/td-p/672334&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;"&lt;STRONG&gt;500 Unexpected Error - Contact your system administrator for more details" is seen after logging into Composer on ThingWorx Platform"&lt;/STRONG&gt;": &lt;A href="https://www.ptc.com/en/support/article/CS355687" target="_blank"&gt;https://www.ptc.com/en/support/article/CS355687&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 02 Jan 2025 13:58:56 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/post-request-for-service-doesnt-work/m-p/991450#M68762</guid>
      <dc:creator>VladimirN</dc:creator>
      <dc:date>2025-01-02T13:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: post request for service doesnt work</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/post-request-for-service-doesnt-work/m-p/993140#M68822</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/888304"&gt;@IA_10816220&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you show us the headers you setup in Postman for this Service request? (make sure to remove any sensitive information in there, of course)&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 07:53:38 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/post-request-for-service-doesnt-work/m-p/993140#M68822</guid>
      <dc:creator>VladimirRosu</dc:creator>
      <dc:date>2025-01-13T07:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: post request for service doesnt work</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/post-request-for-service-doesnt-work/m-p/993421#M68840</link>
      <description>&lt;P&gt;- when GET is working I assume authorization is fine (via appkey or basicauth)&lt;/P&gt;
&lt;P&gt;- for POST you need to specify Header "Content-Type: application/json" and best also header "Accept: application/json". Also you need to pass required parameters of the service in the body.&lt;/P&gt;
&lt;P&gt;When you get the 500 error you might also want to check the TWX Logs (Application/Script/..) if you find what caused the error. Maybe your service is being executed as you want but has an issue while executing (e.g. parameter is missing).&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 12:55:49 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/post-request-for-service-doesnt-work/m-p/993421#M68840</guid>
      <dc:creator>nmutter</dc:creator>
      <dc:date>2025-01-14T12:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: post request for service doesnt work</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/post-request-for-service-doesnt-work/m-p/994254#M68883</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/888304"&gt;@IA_10816220&lt;/a&gt;&lt;/SPAN&gt; ,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I wanted to follow up with you on your post to see if your question has been answered.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If so, please &lt;STRONG&gt;mark the appropriate reply as the Accepted Solution&lt;/STRONG&gt; for the benefit of other members who may have the same question.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Of course, if you have more to share on your issue, please let the Community know so that we can continue to support.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Abhi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG style="width:45.56%;" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/ptc.response.lithium.com/RESPONSEIMAGE/7d9f6428-180d-4ffc-a74e-5b2054f46aeb.default.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 13:24:04 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/post-request-for-service-doesnt-work/m-p/994254#M68883</guid>
      <dc:creator>abandal</dc:creator>
      <dc:date>2025-01-20T13:24:04Z</dc:date>
    </item>
  </channel>
</rss>

