title: Web services - REST vs PHP JSON RPC
body: <p>I am working on a project where I am trying to expose the function of the software. Basically I have my backend set up and was thinking of seperating the frontend from the backend code using JSON msgs. I am a little bit confused as to what is the difference between a service and an API. I know API can be build on top on services. But I have these two models in mind -- to access profile X using json-rpc</p>
  
  <p><a href="http://xyz.com/?request=">http://xyz.com/?request=</a>{"jsonrpc":"2.0","id":1,"method":"getProfile","params":{"id":"X"}} </p>
  
  <p>or should it be like this using REST -</p>
  
  <p><a href="http://api.xyz.com/X">http://api.xyz.com/X</a></p>
  
  <p>Thank You</p>