Web Services

From SugarCRM Wiki

Jump to: navigation, search

SugarCRM provides a web services interface using SOAP (Simple Object Access Protocol)


Contents

Sugar SOAP Introductions and References

SOAP Operations References

  • SOAP Operations could be a wiki page describing the operations (if someone wrote it)
  • See 'Finding the SOAP URLs and WSDL' below for details of how to see a list of operations available to you as listed in the WSDL
  • SugarSoapUsers.php is source code file which lists operations and includes documentation comments on each of the SOAP operations appearing there as functions. HTML docs can be generated from these. Example generated docs

Tutorials

SOAP support in various languages

In theory you could implement an external app in any language that has a SOAP library, from C++ all the way to Perl and from Python to Ruby. The complexity of the task lies not in the protocol, but your knowledge of the language, and the toolkit or library of your choosing. I've dabbled with Ruby, but I feel more at home with PHP, so it's mostly what I'll post here, if anyone uses another language, please post away.

So, some notes by programming language:


Finding the SOAP URLs and WSDL

All SOAP calls into Sugar use soap.php as their entry point. There are several SOAP APIs at this point. The original API implementation is actually in soap.php. This API has been deprecated. All new development should use the APIs located in the soap subfolder of your installation.

  • SoapSugarUsers.php -- Should be used for single user connections. This is the primary API and is able to control all bean types. The Sugar Plug-in for Microsoft Outlook uses this API.
  • SoapPortalUsers.php -- Should be used for portal applications. Sugar Portal uses this API.
  • SoapSync.php -- Should be used for bulk data transfer and getting lists of recent changes.

SoapSugarUsers.php has been updated to have JavaDoc comments in the code. This should help developers leverage the API and speed the development process.

There are also a whole bunch of soap test files in the examples folder. Look under examples for all files that start with soap.

Take a working URL to a sugar server:

https://demo.sugarondemand.com/sugarcrm/index.php

Remove index.php and everything to the right of it. Replace with soap.php

https://demo.sugarondemand.com/sugarcrm/soap.php?wsdl


This will work on any server. If you want to get information from the latest wsdl from our demo servers, please use the following URLs:

https://demo.sugarondemand.com/sugarcrm/soap.php?wsdl
https://demo.sugarondemand.com/sugarcrm/soap.php#


SOAP Interface Internals

Internally on the server side, the SOAP interface is implemented with nuSoap, a PHP SOAP library.

Personal tools