<?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>question Outbound Rest API throwing error in App Engine forum</title>
    <link>https://www.servicenow.com/community/app-engine-forum/outbound-rest-api-throwing-error/m-p/2876511#M4122</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to integrate SNOW to SNOW using App Studio. I have created Outbound REST (POST) to send data. When I test this connection in&amp;nbsp; REST Messages, it works and gives 201 (success).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="balaji_prusty1_0-1711384822207.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/342112i81A0AED1607BA59C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="balaji_prusty1_0-1711384822207.png" alt="balaji_prusty1_0-1711384822207.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I try to use it in the Script-include it gives the error "&lt;SPAN&gt;function getStatusCode() {&lt;/SPAN&gt;&lt;SPAN&gt;[native code, arity=0]&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the Below script that I am passing through Script-Include but getting error "&lt;SPAN&gt;function getStatusCode() {&lt;/SPAN&gt;&lt;SPAN&gt;[native code, arity=0]&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;===============================&lt;/P&gt;&lt;P&gt;var r = new sn_ws.RESTMessageV2('API Integration', 'Acknowledge Service Ticket');&lt;BR /&gt;r.setStringParameterNoEscape('TicketNumber', current.u_external_ticket_no);&lt;BR /&gt;r.setStringParameterNoEscape('CustomerTicketNumber', current.number);&lt;BR /&gt;gs.info(r);&lt;BR /&gt;var response = r.executeAsync();&lt;BR /&gt;var responseBody = response.getBody();&lt;BR /&gt;var httpStatus = response.getStatusCode;&lt;BR /&gt;gs.info(httpStatus);&lt;BR /&gt;var parser = new global.JSON();&lt;BR /&gt;var responseObj = parser.decode(responseBody);&lt;BR /&gt;return responseObj;&lt;/P&gt;&lt;P&gt;=========================&lt;/P&gt;&lt;P&gt;Need help on this, if anyone found this issue and a solution for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Balaji Prusty&lt;/P&gt;</description>
    <pubDate>Mon, 25 Mar 2024 17:34:20 GMT</pubDate>
    <dc:creator>balaji_prusty1</dc:creator>
    <dc:date>2024-03-25T17:34:20Z</dc:date>
    <item>
      <title>Outbound Rest API throwing error</title>
      <link>https://www.servicenow.com/community/app-engine-forum/outbound-rest-api-throwing-error/m-p/2876511#M4122</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to integrate SNOW to SNOW using App Studio. I have created Outbound REST (POST) to send data. When I test this connection in&amp;nbsp; REST Messages, it works and gives 201 (success).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="balaji_prusty1_0-1711384822207.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/342112i81A0AED1607BA59C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="balaji_prusty1_0-1711384822207.png" alt="balaji_prusty1_0-1711384822207.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I try to use it in the Script-include it gives the error "&lt;SPAN&gt;function getStatusCode() {&lt;/SPAN&gt;&lt;SPAN&gt;[native code, arity=0]&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the Below script that I am passing through Script-Include but getting error "&lt;SPAN&gt;function getStatusCode() {&lt;/SPAN&gt;&lt;SPAN&gt;[native code, arity=0]&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;===============================&lt;/P&gt;&lt;P&gt;var r = new sn_ws.RESTMessageV2('API Integration', 'Acknowledge Service Ticket');&lt;BR /&gt;r.setStringParameterNoEscape('TicketNumber', current.u_external_ticket_no);&lt;BR /&gt;r.setStringParameterNoEscape('CustomerTicketNumber', current.number);&lt;BR /&gt;gs.info(r);&lt;BR /&gt;var response = r.executeAsync();&lt;BR /&gt;var responseBody = response.getBody();&lt;BR /&gt;var httpStatus = response.getStatusCode;&lt;BR /&gt;gs.info(httpStatus);&lt;BR /&gt;var parser = new global.JSON();&lt;BR /&gt;var responseObj = parser.decode(responseBody);&lt;BR /&gt;return responseObj;&lt;/P&gt;&lt;P&gt;=========================&lt;/P&gt;&lt;P&gt;Need help on this, if anyone found this issue and a solution for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Balaji Prusty&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 17:34:20 GMT</pubDate>
      <guid>https://www.servicenow.com/community/app-engine-forum/outbound-rest-api-throwing-error/m-p/2876511#M4122</guid>
      <dc:creator>balaji_prusty1</dc:creator>
      <dc:date>2024-03-25T17:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Outbound Rest API throwing error</title>
      <link>https://www.servicenow.com/community/app-engine-forum/outbound-rest-api-throwing-error/m-p/2876647#M4124</link>
      <description>&lt;P&gt;I think you missed a bracket in below line for&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;getStatusCode()&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;var httpStatus = response.getStatusCode;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 19:59:39 GMT</pubDate>
      <guid>https://www.servicenow.com/community/app-engine-forum/outbound-rest-api-throwing-error/m-p/2876647#M4124</guid>
      <dc:creator>SanjivMeher</dc:creator>
      <dc:date>2024-03-25T19:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Outbound Rest API throwing error</title>
      <link>https://www.servicenow.com/community/app-engine-forum/outbound-rest-api-throwing-error/m-p/2876820#M4125</link>
      <description>&lt;P&gt;Thanks, Sanjiv,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After fix the bracket, now getting the error "&lt;SPAN&gt;Status code from Taliom: 500&lt;/SPAN&gt;" but when I test in Outbound Test (post) it is working fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Onle diff b/w outbound rest and script include is "r.&lt;SPAN&gt;executeAsync()&lt;/SPAN&gt;".&amp;nbsp; In the scoped app it is asking to use "&lt;SPAN&gt;executeAsync()&lt;/SPAN&gt;" but when I generate the script in outbound rest it is showing "r.execute()".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help why error 500 is throwing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Balaji Prusty&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 03:00:13 GMT</pubDate>
      <guid>https://www.servicenow.com/community/app-engine-forum/outbound-rest-api-throwing-error/m-p/2876820#M4125</guid>
      <dc:creator>balaji_prusty1</dc:creator>
      <dc:date>2024-03-26T03:00:13Z</dc:date>
    </item>
  </channel>
</rss>

