<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarcrm.com/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>How to get json data in REST endpoint</title><link>https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/813/how-to-get-json-data-in-rest-endpoint</link><description>I have added an extra action to the recordlist view; custom/modules/Opportunities/clients/base/views/recordlist/recordlist.js: ({ extendsFrom: &amp;#39;RecordlistView&amp;#39;, initialize: function(options) { this._super(&amp;quot;initialize&amp;quot;, [options]); //add listener for custom</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to get json data in REST endpoint</title><link>https://sugarclub.sugarcrm.com/thread/3170?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 15:18:27 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:02f0bbc9-2d65-4e1b-aa7f-026f55a658af</guid><dc:creator>Andrew Gin</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;&lt;p&gt;Changing call method to &amp;#39;create&amp;#39; and the endpoint method to POST has fixed this; $args now contains&lt;/p&gt;&lt;pre&gt;Array&lt;br /&gt;(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [selected_ids] =&amp;gt; Array&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0] =&amp;gt; 0124a524-accc-11e6-96a8-005056897bc3&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [__sugar_url] =&amp;gt; v10/Opportunities/Export2&lt;br /&gt;)&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get json data in REST endpoint</title><link>https://sugarclub.sugarcrm.com/thread/3169?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 14:14:19 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:3c444b27-596a-4ce6-899d-d6a9523b4c7d</guid><dc:creator>Matt Marum</dc:creator><description>&lt;p&gt;Can you verify using your browser&amp;#39;s developer tools (network tab) that the HTTP request is being sent correctly? That will help you figure out if it is a JavaScript problem or a server side one.&lt;/p&gt;&lt;p&gt;One thing I noticed is that you are using a GET endpoint but are trying to pass data in the request body. This may cause a problem since GET requests typically do not have data in the request body which could cause it to be dropped. Request bodies are typically used with PUT and POST requests.&lt;/p&gt;&lt;p&gt;Try passing your selected IDs as a URL parameter (which is a valid way of passing arguments on a GET request) or changing your endpoint to be a PUT or POST.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>