Set-up a HTTP RPC-style webservice

Hi there, We are using Teamleader as our CRM system. I've developed an application in Mendix, which I want to interact with Teamleader using their API.  I've already set-up another API (Chamber of Commerce), but the Teamleader API works a little bit different, not a REST service but a HTTP RPC-style method. Documentation about their API can be found here. I want to use both POST and GET functionality.  Is there anyone who can help by explaining what are the first steps to take in Mendix? Thanks in advance!
3 answers

There is no real technical difference between HTTP-RPC and REST. Both use HTTP protocol, with HTTP actions on URLS, with usually JSON messages.

This means that Mendix REST can be used out-of-the-box for HTTP-RPC. It could also be called a HTTP-RPC client, only reason it's not called this way is that HTTP-RPC is not very popular anymore.

So, what is the difference between REST and HTTP-RPC when it's not technical? It's a best practice: the URL in REST normally refer to data, where as the URL in HTTP-RPC normally refers to an action.

For example:

* To get contract 1 in REST => GET http://localhost/api/contracts/1

* To get contract 1 in HTTP-RPC => GET http://localhost/api/getcontract?contract_id=1  or something similar.

Anyway, the REST consume functionality in Mendix doesn't really care if your URL points to data or a remote procedure (RPC).




Check out about consuming a rest service, see also the tutorial video with it!


The documentation seems straightforward. Did you follow this learning path?


I have misread the part about RPC. There is a github project that might be usefull:

But you might run into more problems:

My assumption might be wrong but RPC seems to be on the way out and might not even work in a Mendix environment.