<?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 pass filter param as query string for GET</title><link>https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/899/how-to-pass-filter-param-as-query-string-for-get</link><description>Environment: C# (asp.net 2.0 framework), REST V10. since passing parameter as body is not supported in WebRequest for GET method, I am try to pass parameters as query string. I can successfully pass order_by, fields and other parameters But not successful</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to pass filter param as query string for GET</title><link>https://sugarclub.sugarcrm.com/thread/3494?ContentTypeID=1</link><pubDate>Fri, 05 May 2017 19:42:31 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:613e4809-b90e-4d10-8f1d-4927ba2742dd</guid><dc:creator>Rama Reddy</dc:creator><description>&lt;p&gt;Hello &lt;span&gt;&lt;strong&gt;David L&amp;oacute;pez ,&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;strong&gt;Can you please provide me some examples for passing multiple parameter values (IN operator)? &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;strong&gt;You help is really appreciated.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;strong&gt;Thanks&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;strong&gt;Rama&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to pass filter param as query string for GET</title><link>https://sugarclub.sugarcrm.com/thread/3493?ContentTypeID=1</link><pubDate>Fri, 28 Oct 2016 06:10:56 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:49b6fb0b-2523-4f08-b7d4-25552dd916ea</guid><dc:creator>David L&amp;#243;pez</dc:creator><description>&lt;p&gt;Thank you &lt;a href="https://sugarclub.sugarcrm.com/members/rkreddyv"&gt;Rama Reddy&lt;/a&gt;!&lt;/p&gt;&lt;p&gt;Regards,&lt;/p&gt;&lt;p&gt;David.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to pass filter param as query string for GET</title><link>https://sugarclub.sugarcrm.com/thread/3492?ContentTypeID=1</link><pubDate>Thu, 27 Oct 2016 20:59:57 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:5e6b3795-5310-4604-be10-b6461296ab72</guid><dc:creator>Rama Reddy</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello David L&amp;oacute;pez, &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Please ignore my previous post. Now it is working fine. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Thank you very much for your help. You are awesome.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Rama&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to pass filter param as query string for GET</title><link>https://sugarclub.sugarcrm.com/thread/3491?ContentTypeID=1</link><pubDate>Thu, 27 Oct 2016 06:51:38 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:30839ced-8355-4331-9b6e-dc9efac0af9f</guid><dc:creator>David L&amp;#243;pez</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://sugarclub.sugarcrm.com/members/rkreddyv"&gt;Rama Reddy&lt;/a&gt;,&lt;/p&gt;&lt;p&gt;The URL you are trying to pass in order for the filter to work is bad formed.&lt;/p&gt;&lt;p&gt;The URL should be like the following:&lt;/p&gt;&lt;pre class="language-none line-numbers"&gt;&lt;code&gt;http://&amp;lt;base URL&amp;gt;/Accounts/filter?filter[0][name]=DENALI&amp;amp;fields=id,name,start_rr_c&amp;amp;max_num=1000&lt;span class="line-numbers-rows"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you wanted to get&amp;nbsp;&lt;strong&gt;all the accounts whose name starts by DENALI&amp;nbsp;&lt;/strong&gt;it should be like this:&lt;/p&gt;&lt;pre class="language-none line-numbers"&gt;&lt;code&gt;http://&amp;lt;base URL&amp;gt;/Accounts/filter?filter[0][name][$starts]=DENALI&amp;amp;fields=id,name,start_rr_c&amp;amp;max_num=1000&lt;span class="line-numbers-rows"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And if you want to filter your result according to more complex logic you should try something like this:&lt;/p&gt;&lt;pre class="language-none line-numbers"&gt;&lt;code&gt;http://&amp;lt;base URL&amp;gt;/Accounts/filter?filter[0][$and][0][name]=DENALI&amp;amp;filter[0][$and][1][email1]=test@denali.com&amp;amp;fields=id,name,start_rr_c&amp;amp;max_num=1000&lt;span class="line-numbers-rows"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In this last one what I am doing is to&amp;nbsp;&lt;strong&gt;&lt;span&gt;get all the accounts whose name is DENALI and email is &lt;/span&gt;&lt;a href="mailto:test@denali.com"&gt;test@denali.com&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;Let me know if you need further help with this.&lt;/p&gt;&lt;p&gt;Hope it helps!&lt;/p&gt;&lt;p&gt;Regards,&lt;/p&gt;&lt;p&gt;&lt;br /&gt;David.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>