REST Support and REST Message format

This option allows for additionally creating a RESTful service endpoint. RESTful services expose resources via URIs, and clients access these resources using the four HTTP verbs.

Note: For CRM.webservices only GET and POST are used.
In order to keep the API for developers of client applications as simply 1 and convenient as possible the following applies:
  1. GET is used for all methods that don’t take any parameters and for methods with parameters that can be included in URLs (e.g. Login, Logout, IsLoggedIn …).
  2. The verb POST is used for all others methods which implement CRUD operations. Each CRUD operation has a corresponding unique URL that clients send their requests to (e.g. QueryCompany, InsertCompany, UpdateCompany and DeleteCompany).

The message format can also be selected, either XML or JSON or automatic (which means that the response format is identical to the format of the request).

1

For example using GET for QueryCompany would require mapping objects describing search conditions or sort criteria to parts of query string because GET doesn’t accept complex parameters. And e.g. conditions can be quite complex the generation and maintenance or such an URL and be a nightmare. An alternative would be encoding those objects into string for example and send this as query parameter. But that would require client applications to call additional methods before sending their request to the webservcie endpoint and require an additional decoding step at the service enpoint.