<?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 Re: why do we use &amp;quot;post&amp;quot; method instead of &amp;quot;get&amp;quot; method in Rest Api in HRSD forum</title>
    <link>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2828115#M34726</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/484540"&gt;@Madhan007&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Interesting question. Do you know if there were/are any security concerns with the ID or data being returned? The only justification I've seen previously for using a 'post' method rather than a 'get' method is&amp;nbsp;&lt;SPAN&gt;because the data sent is part of the URL with a 'get'. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Additionally, a 'post' is not cached and parameters are not saved in the browser history.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'd steer you the below for a quick overview of the differences and let you determine what's best, however, generally, your spidey senses are correct. This would normally be a 'get'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;To help others (or for me to help you more directly), please mark this response correct by clicking on&amp;nbsp;&lt;STRONG&gt;Accept as Solution&lt;/STRONG&gt;&amp;nbsp;and/or&amp;nbsp;&lt;STRONG&gt;Helpful&lt;/STRONG&gt;.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Thanks, Robbie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following table compares the two HTTP methods: GET and POST. (Source: &lt;A href="https://www.w3schools.com/tags/ref_httpmethods.asp" target="_self"&gt;W3C&lt;/A&gt;)&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp; GET POST &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;BACK button/Reload&lt;/TD&gt;&lt;TD&gt;Harmless&lt;/TD&gt;&lt;TD&gt;Data will be re-submitted (the browser should alert the user that the data are about to be re-submitted)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Bookmarked&lt;/TD&gt;&lt;TD&gt;Can be bookmarked&lt;/TD&gt;&lt;TD&gt;Cannot be bookmarked&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Cached&lt;/TD&gt;&lt;TD&gt;Can be cached&lt;/TD&gt;&lt;TD&gt;Not cached&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Encoding type&lt;/TD&gt;&lt;TD&gt;application/x-www-form-urlencoded&lt;/TD&gt;&lt;TD&gt;application/x-www-form-urlencoded or multipart/form-data. Use multipart encoding for binary data&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;History&lt;/TD&gt;&lt;TD&gt;Parameters remain in browser history&lt;/TD&gt;&lt;TD&gt;Parameters are not saved in browser history&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Restrictions on data length&lt;/TD&gt;&lt;TD&gt;Yes, when sending data, the GET method adds the data to the URL; and the length of a URL is limited (maximum URL length is 2048 characters)&lt;/TD&gt;&lt;TD&gt;No restrictions&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Restrictions on data type&lt;/TD&gt;&lt;TD&gt;Only ASCII characters allowed&lt;/TD&gt;&lt;TD&gt;No restrictions. Binary data is also allowed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Security&lt;/TD&gt;&lt;TD&gt;GET is less secure compared to POST because data sent is part of the URL&lt;BR /&gt;&lt;BR /&gt;Never use GET when sending passwords or other sensitive information!&lt;/TD&gt;&lt;TD&gt;POST is a little safer than GET because the parameters are not stored in browser history or in web server logs&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Visibility&lt;/TD&gt;&lt;TD&gt;Data is visible to everyone in the URL&lt;/TD&gt;&lt;TD&gt;Data is not displayed in the URL&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 15 Feb 2024 09:51:45 GMT</pubDate>
    <dc:creator>Robbie</dc:creator>
    <dc:date>2024-02-15T09:51:45Z</dc:date>
    <item>
      <title>why do we use "post" method instead of "get" method in Rest Api</title>
      <link>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2828079#M34723</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;We had an Integration Requirement where we pass the 'Name' parameter in the Rest Api message and get the respective 'ID' in return. But for this,&amp;nbsp; I dont Understand why POST method has been used instead of GET method. Please pour your insights into this.&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 09:27:29 GMT</pubDate>
      <guid>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2828079#M34723</guid>
      <dc:creator>Madhan007</dc:creator>
      <dc:date>2024-02-15T09:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: why do we use "post" method instead of "get" method in Rest Api</title>
      <link>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2828112#M34725</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/484540"&gt;@Madhan007&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;POST Method is used whenever we want to create a record in the target system. So for eg if u want to create a incident in some tool/instance u will pass certain parameters such as Short description description etc &amp;amp; in return u will receive the number which is created on the target tool or instance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So to create a record via API's POST method is used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Danish&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 09:50:34 GMT</pubDate>
      <guid>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2828112#M34725</guid>
      <dc:creator>Danish Bhairag2</dc:creator>
      <dc:date>2024-02-15T09:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: why do we use "post" method instead of "get" method in Rest Api</title>
      <link>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2828115#M34726</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/484540"&gt;@Madhan007&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Interesting question. Do you know if there were/are any security concerns with the ID or data being returned? The only justification I've seen previously for using a 'post' method rather than a 'get' method is&amp;nbsp;&lt;SPAN&gt;because the data sent is part of the URL with a 'get'. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Additionally, a 'post' is not cached and parameters are not saved in the browser history.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'd steer you the below for a quick overview of the differences and let you determine what's best, however, generally, your spidey senses are correct. This would normally be a 'get'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;To help others (or for me to help you more directly), please mark this response correct by clicking on&amp;nbsp;&lt;STRONG&gt;Accept as Solution&lt;/STRONG&gt;&amp;nbsp;and/or&amp;nbsp;&lt;STRONG&gt;Helpful&lt;/STRONG&gt;.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Thanks, Robbie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following table compares the two HTTP methods: GET and POST. (Source: &lt;A href="https://www.w3schools.com/tags/ref_httpmethods.asp" target="_self"&gt;W3C&lt;/A&gt;)&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp; GET POST &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;BACK button/Reload&lt;/TD&gt;&lt;TD&gt;Harmless&lt;/TD&gt;&lt;TD&gt;Data will be re-submitted (the browser should alert the user that the data are about to be re-submitted)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Bookmarked&lt;/TD&gt;&lt;TD&gt;Can be bookmarked&lt;/TD&gt;&lt;TD&gt;Cannot be bookmarked&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Cached&lt;/TD&gt;&lt;TD&gt;Can be cached&lt;/TD&gt;&lt;TD&gt;Not cached&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Encoding type&lt;/TD&gt;&lt;TD&gt;application/x-www-form-urlencoded&lt;/TD&gt;&lt;TD&gt;application/x-www-form-urlencoded or multipart/form-data. Use multipart encoding for binary data&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;History&lt;/TD&gt;&lt;TD&gt;Parameters remain in browser history&lt;/TD&gt;&lt;TD&gt;Parameters are not saved in browser history&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Restrictions on data length&lt;/TD&gt;&lt;TD&gt;Yes, when sending data, the GET method adds the data to the URL; and the length of a URL is limited (maximum URL length is 2048 characters)&lt;/TD&gt;&lt;TD&gt;No restrictions&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Restrictions on data type&lt;/TD&gt;&lt;TD&gt;Only ASCII characters allowed&lt;/TD&gt;&lt;TD&gt;No restrictions. Binary data is also allowed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Security&lt;/TD&gt;&lt;TD&gt;GET is less secure compared to POST because data sent is part of the URL&lt;BR /&gt;&lt;BR /&gt;Never use GET when sending passwords or other sensitive information!&lt;/TD&gt;&lt;TD&gt;POST is a little safer than GET because the parameters are not stored in browser history or in web server logs&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Visibility&lt;/TD&gt;&lt;TD&gt;Data is visible to everyone in the URL&lt;/TD&gt;&lt;TD&gt;Data is not displayed in the URL&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 15 Feb 2024 09:51:45 GMT</pubDate>
      <guid>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2828115#M34726</guid>
      <dc:creator>Robbie</dc:creator>
      <dc:date>2024-02-15T09:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: why do we use "post" method instead of "get" method in Rest Api</title>
      <link>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2830142#M34749</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Is it done through the scripted rest api,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then there might be the condition if "Name" parameter exists the return the respective ID, else do the POST request update/insert.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Generally the coder might be lazy and wanted to fit every thing in one and let the code to handle every thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you found my answer correct do mark it helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Saurabh.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 16:15:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2830142#M34749</guid>
      <dc:creator>SaurabhD8867250</dc:creator>
      <dc:date>2024-02-16T16:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: why do we use "post" method instead of "get" method in Rest Api</title>
      <link>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2830218#M34751</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://www.servicenow.com/community/user/viewprofilepage/user-id/484540" target="_blank"&gt;@Madhan007&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you see my earlier response?&lt;/P&gt;&lt;P&gt;So my answer is not lost in the thread, I've re-posted it.&lt;/P&gt;&lt;P&gt;Interesting question. Do you know if there were/are any security concerns with the ID or data being returned? The only justification I've seen previously for using a 'post' method rather than a 'get' method is&amp;nbsp;&lt;SPAN&gt;because the data sent is part of the URL with a 'get'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Additionally, a 'post' is not cached and parameters are not saved in the browser history.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'd steer you the below for a quick overview of the differences and let you determine what's best, however, generally, your spidey senses are correct. This would normally be a 'get'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;To help others (or for me to help you more directly), please mark this response correct by clicking on&amp;nbsp;&lt;STRONG&gt;Accept as Solution&lt;/STRONG&gt;&amp;nbsp;and/or&amp;nbsp;&lt;STRONG&gt;Helpful&lt;/STRONG&gt;.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Thanks, Robbie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following table compares the two HTTP methods: GET and POST. (Source:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.w3schools.com/tags/ref_httpmethods.asp" target="_self" rel="nofollow noopener noreferrer"&gt;W3C&lt;/A&gt;)&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp; GET POST &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;BACK button/Reload&lt;/TD&gt;&lt;TD&gt;Harmless&lt;/TD&gt;&lt;TD&gt;Data will be re-submitted (the browser should alert the user that the data are about to be re-submitted)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Bookmarked&lt;/TD&gt;&lt;TD&gt;Can be bookmarked&lt;/TD&gt;&lt;TD&gt;Cannot be bookmarked&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Cached&lt;/TD&gt;&lt;TD&gt;Can be cached&lt;/TD&gt;&lt;TD&gt;Not cached&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Encoding type&lt;/TD&gt;&lt;TD&gt;application/x-www-form-urlencoded&lt;/TD&gt;&lt;TD&gt;application/x-www-form-urlencoded or multipart/form-data. Use multipart encoding for binary data&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;History&lt;/TD&gt;&lt;TD&gt;Parameters remain in browser history&lt;/TD&gt;&lt;TD&gt;Parameters are not saved in browser history&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Restrictions on data length&lt;/TD&gt;&lt;TD&gt;Yes, when sending data, the GET method adds the data to the URL; and the length of a URL is limited (maximum URL length is 2048 characters)&lt;/TD&gt;&lt;TD&gt;No restrictions&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Restrictions on data type&lt;/TD&gt;&lt;TD&gt;Only ASCII characters allowed&lt;/TD&gt;&lt;TD&gt;No restrictions. Binary data is also allowed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Security&lt;/TD&gt;&lt;TD&gt;GET is less secure compared to POST because data sent is part of the URL&lt;BR /&gt;&lt;BR /&gt;Never use GET when sending passwords or other sensitive information!&lt;/TD&gt;&lt;TD&gt;POST is a little safer than GET because the parameters are not stored in browser history or in web server logs&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Visibility&lt;/TD&gt;&lt;TD&gt;Data is visible to everyone in the URL&lt;/TD&gt;&lt;TD&gt;Data is not displayed in the URL&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 16 Feb 2024 17:04:24 GMT</pubDate>
      <guid>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2830218#M34751</guid>
      <dc:creator>Robbie</dc:creator>
      <dc:date>2024-02-16T17:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: why do we use "post" method instead of "get" method in Rest Api</title>
      <link>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2833286#M34807</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/57655"&gt;@Robbie&lt;/a&gt;, How does "Post" Method can fetch data without creating a Record in the database?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 11:20:40 GMT</pubDate>
      <guid>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2833286#M34807</guid>
      <dc:creator>Madhan007</dc:creator>
      <dc:date>2024-02-20T11:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: why do we use "post" method instead of "get" method in Rest Api</title>
      <link>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2836308#M34867</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/484540"&gt;@Madhan007&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I can provide context and perhaps an example, can you advise if the POST is inbound (received into your SN instance) or outbound (sent from SN to another system)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;To help others (or for me to help you more directly), please mark this response correct by clicking on&amp;nbsp;&lt;STRONG&gt;Accept as Solution&lt;/STRONG&gt;&amp;nbsp;and/or&amp;nbsp;&lt;STRONG&gt;Helpful&lt;/STRONG&gt;.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Thanks, Robbie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 08:52:08 GMT</pubDate>
      <guid>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2836308#M34867</guid>
      <dc:creator>Robbie</dc:creator>
      <dc:date>2024-02-22T08:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: why do we use "post" method instead of "get" method in Rest Api</title>
      <link>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2836710#M34873</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/57655"&gt;@Robbie&lt;/a&gt;&amp;nbsp;, it is outboud (sent from SN to other)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 12:50:45 GMT</pubDate>
      <guid>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2836710#M34873</guid>
      <dc:creator>Madhan007</dc:creator>
      <dc:date>2024-02-22T12:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: why do we use "post" method instead of "get" method in Rest Api</title>
      <link>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2965721#M37147</link>
      <description>&lt;P&gt;This is interesting&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/548608"&gt;@DanishBhairag2&lt;/a&gt;&amp;nbsp;. I am having an issue at the moment where I do a GET via a script in a Scheduled Job to an external dbase, and I am only receiving back Updates in the import set and not Inserts.&lt;/P&gt;&lt;P&gt;Can you verify if this is my issue with the below script, and if I should be using POST instead and how in the script?&lt;/P&gt;&lt;P&gt;This is my Scheduled Job Script:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;try {
    var r = new sn_ws.RESTMessageV2('ConnectWise', 'Default GET');
    r.setStringParameterNoEscape('yesterdayFormatted', gs.getProperty('connectwise.currentDateTime'));
    var response = r.execute();
    var responseBody = response.getBody();
    var httpStatus = response.getStatusCode();
    var parsed = JSON.parse(responseBody);

    var statusCodesProperty = gs.getProperty('http.response.status.codes');
    var httpStatusCodeArray = statusCodesProperty.split(', ');

    //Check if httpStatus exists in the array
    if (httpStatusCodeArray.indexOf(httpStatus.toString()) !== -1) {
        var crImpSet = new GlideRecord('sys_import_set');
        crImpSet.initialize();
        crImpSet.mode = 'asynchronous';
        crImpSet.table_name = 'u_connectwise_asset_data';
        crImpSet.state = 'loading';
        crImpSet.insert();

        var restGR = new GlideRecord('u_connectwise_asset_data');
        for (var i = 0; i &amp;lt; parsed.length; i++) {
            restGR.initialize();
            restGR.u_config_recid = parsed[i].id;
            restGR.u_configuration_type = parsed[i].type.name;
            restGR.u_status = parsed[i].status.name;
            restGR.u_company = parsed[i].company.name;
            restGR.u_expires = parsed[i].warrantyExpirationDate;
            restGR.u_serial_number = parsed[i].serialNumber;
            restGR.u_model_number = parsed[i].modelNumber;
            restGR.u_vendor = parsed[i].vendor.name;
            restGR.u_tag_number = parsed[i].tagNumber;
            restGR.u_contact = parsed[i].contact.name;
            restGR.u_installed = parsed[i].installationDate;
            restGR.u_locations = parsed[i].location.name;
            restGR.u_site_name = parsed[i].site.name;
            restGR.u_purchased = parsed[i].purchaseDate;
            restGR.u_manufacturer = parsed[i].manufacturer.name;

            restGR.sys_import_set = crImpSet.sys_id;
            restGR.insert();
        }
    }
    crImpSet.state = "loaded";
    crImpSet.load_completed = gs.nowDateTime();
    gs.setProperty('connectwise.currentDateTime', crImpSet.load_completed.getDisplayValue());
    crImpSet.update();

    var transformer = new GlideImportSetTransformer();
    transformer.transformAllMaps(crImpSet); //Transform the import set rows
    if (transformer.isError()) {
        gs.error('Error executing the transform');
    }
} catch (ex) {
    var message = ex.message;
}&lt;/LI-CODE&gt;&lt;P&gt;This is my ResponseBody&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
        "id": 19192,
        "name": "CWRR213",
        "type": {
            "id": 25,
            "name": "PC/Notebook",
            "_info": {
                "type_href": ""
            }
        },
        "status": {
            "id": 1,
            "name": "Active",
            "_info": {
                "status_href": ""            }
        },
        "company": {
            "id": 2791,
            "identifier": "RANDOM",
            "name": "Random Ltd",
            "_info": {
                "company_href": ""
            }
        },
        "contact": {
            "id": 12225,
            "name": "Random",
            "_info": {
                "contact_href": ""
            }
         },
        "deviceIdentifier": "",
        "serialNumber": "1234567",
        "modelNumber": "ThinkPad L480",
        "tagNumber": "A0012345",
        "installationDate": "2019-06-04T10:51:33Z",
        "warrantyExpirationDate": "2022-07-08T00:00:00Z",
        "vendorNotes": "",
        "notes": "Location Jan 2023 Sesame St Site Audit: Admin Office     \nHad a Sticker that has since worn off (old Asset Tag: A004321)\n\n123456 - User Exit: Joe Bloggs - appears to be a shared machine ",
        "macAddress": "",
        "lastLoginName": "",
        "billFlag": false,
        "backupSuccesses": 0,
        "backupIncomplete": 0,
        "backupFailed": 0,
        "backupRestores": 0,
        "backupServerName": "",
        "backupBillableSpaceGb": 0.00,
        "backupProtectedDeviceList": "",
        "backupYear": 0,
        "backupMonth": 0,
        "ipAddress": "",
        "defaultGateway": "",
        "osType": "",
        "osInfo": "",
        "cpuSpeed": "",
        "ram": "",
        "localHardDrives": "",
        "manufacturer": {
            "id": 12,
            "name": "Lenovo",
            "_info": {
                "manufacturer_href": ""
            }
        },
        "questions": [
             
            {
                "answerId": 60742,
                "questionId": 289,
                "question": "IMEI",
                "sequenceNumber": 3.00,
                "numberOfDecimals": 0,
                "fieldType": "Text",
                "requiredFlag": false
            }
        ],
        "activeFlag": true,
        "managementLink": "",
        "remoteLink": "",
        "mobileGuid": "",
        "companyLocationId": 72,
        "showRemoteFlag": false,
        "showAutomateFlag": false,
        "needsRenewalFlag": false,
        "manufacturerPartNumber": "",
        "_info": {
            "lastUpdated": "2024-05-29T01:15:00Z",
            "updatedBy": "",
            "dateEntered": "2019-06-27T06:31:55Z",
            "enteredBy": ""
        },
 "customFields": [
 {
                "id": 55,
                "caption": "Disposal Date",
                "type": "Date",
                "entryMethod": "EntryField",
                "numberOfDecimals": 0
            },
            {
                "id": 80,
                "caption": "Date Last Sighted",
                "type": "Date",
                "entryMethod": "EntryField",
                "numberOfDecimals": 0,
                "value": "2024-05-29T00:00:00Z"
            }
			
			     ]
    },&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 18 Jun 2024 00:33:35 GMT</pubDate>
      <guid>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/2965721#M37147</guid>
      <dc:creator>mattmm</dc:creator>
      <dc:date>2024-06-18T00:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: why do we use "post" method instead of "get" method in Rest Api</title>
      <link>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/3549453#M45811</link>
      <description>&lt;P&gt;For Inbound Integration we can use POST method to read data from servicenow as it is the secured way.&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2026 03:15:06 GMT</pubDate>
      <guid>https://www.servicenow.com/community/hrsd-forum/why-do-we-use-quot-post-quot-method-instead-of-quot-get-quot/m-p/3549453#M45811</guid>
      <dc:creator>JaishreeR</dc:creator>
      <dc:date>2026-05-27T03:15:06Z</dc:date>
    </item>
  </channel>
</rss>

