My company has been offering a SOAP-based API since around 2002. We recently ran a survey on our site in which a full 25% of visiting developers said that SOAP is a show-stopper for them and that they would prefer REST, even though we provide full code samples in various languages for our SOAP interface.
Ever mindful of our clients' wishes, we've begun designing a REST interface. We've been trying to adopt the best practices of API providers out there, and we're planning to provide client libraries for the most popular languages as well.
This will take us a good few months, designing objects and operations, implementing the service, creating code samples, etc. At the end of this process, a PHP developer, for example, will be able to send a fax through the REST API by using this code:
<?php
require('Interfax.php');
$client = new InterfaxClient($username, $password, $faxnumber, $texttofax, $filetype);
$result = $client->SendFax;
echo $result;
?>
instead of this code:
<?php
$client = new SoapClient("http://ws.interfax.net/dfs.asmx?wsdl");
$params->Username = $username;
$params->Password = $password;
$params->FaxNumber = $faxnumber;
$params->Data = $texttofax ;
$params->FileType = $filetype;
$result = $client->SendCharFax($params);
echo $result->SendCharFaxResult;
?>
which is, effectively, the same. The complexity of interfacing to the API is hidden in a custom library instead of a SOAP library. Which brings me to ask myself "what's the point"? Where does the advantage of having a REST interface come into play?