Today I saw a post from Mr. John Mertic that described how to interact with the new API via cURL. While it’s a great piece of information, I find working with the Guzzle library to be much more efficient due to Guzzle’s support for event listeners. That and I hate working directly with cURL.
That said, lets get down to business and start working with the new API.
First, lets update composer.json to install Guzzle
Next, install the library via composer
Now with Guzzle auto loaded we can start to have our fun with the new API.
As you can see, using Guzzle makes interacting with the new API a breeze and has an added bonus of making the code much easier to understand.
Stay tuned, on my next post I’ll show how you can use the SugarCRM 7 API Wrapper Class to accomplish the same task in just a few lines of code.
4 thoughts on “Using SugarCRM’s New RESTful API With Guzzle”
Sean,
That’s a nifty info! thanks
Please can you tell if the Guzzle client is compatible with the bundled RESTful api bundled in version 6.6 & 6.7 in SugarCRM? For instance, I am using RESTful api v4_1 (4.1) in my SugarCRM instance… can I use the Guzzle client there?
So what version of SugarCRM is this? I’ve not seen this oauth token authentication before, and /rest/v10 is new to me.
Jason,
The v10 REST API is available in versions 6.6 (on-demand only), 6.7 (on-demand only), and 7.x.
Sean,
That’s a nifty info! thanks
Please can you tell if the Guzzle client is compatible with the bundled RESTful api bundled in version 6.6 & 6.7 in SugarCRM? For instance, I am using RESTful api v4_1 (4.1) in my SugarCRM instance… can I use the Guzzle client there?