REST service documentation.
What is REST?
REST stands for 'Representational State Transfer'. This protocol is used by Sugar to exchange information both internally and externally.
How do I access the REST service?
The REST service in SugarCRM and be found by navigating to:
Where 'sugar_url' is the url of your Sugar instance and 'version' is the latest version of the API specific to your release of Sugar. You can find out more about versioning in the section titled 'API: Versioning'.
Input / Output Datatypes
The default input / output datatype for REST is JSON / PHP serialize.
These datatype files, SugarRestJSON.php and SugarRestSerialize.php, are in:
Defining your own datatypes
You can also define you own datatype. To do this, you need to create a new file such as:
Next, you will need to override generateResponse() and serve() functions. The Serve function decodes or unserializes the appropriate datatype based on the input type; the generateResponse function encodes or serializes it based on the output type.
If you are making a REST request via cURL from within the Sugar application, you can make use of the SugarHttpClient Class. This class will help automate your cURL requests for you.
REST Failure Response
If a call failure should occur, the result will be as shown below:
|description||String||Description of error.|
Last modified: 01/15/2016 10:13pm