AnsweredAssumed Answered

Sugar 7 - REST Webservice not accepting Get/Post parameters?

Question asked by Ramon Marcondes on Jul 26, 2016
Latest reply on Jul 27, 2016 by Ramon Marcondes


I'm using Sugar Enterprise 7.7.

I'm making a webservice that returns some data.

It uses two optional parameters: client ('cliente' in brazilian portuguese), and date ('data' in brazilian portuguese).

The link to call would be something like this, for example: http://siteurl/TestApiCatalogoRegistrosSandbox.php?data=21/06/2016

If one of them is not empty, it will add some condition to the SQL select clause.

In the webservice call it has some condition to convert POST / GET parameters to the $arguments array parameter, which would be called in the webservice main code as an $args array parameter. I tried both POST and GET options in the "call" method.

This didn't work, so I tried putting directly $_GET, $_POST, and $_REQUEST parameter in the webservice main code, and obviously it didn't work too...

What I'm doing wrong?


I attached two files:

  • "TestApiCatalogoRegistrosSandbox.php" is the webservice call code (the 'configApiSugarcrm.php' include in the code is only the credentials, the credentials are ok until now)
  • "EndpointsAccountsApi.php" is the main webservice code. The method that is called in the file is "catalogoRegistros".


The manifest file is correct, as it is calling the webservice, but without the extra parameters in the sql clause.


Any help would be appreciated.



Best Regards,

Ramon Marcondes