API – Choosing Between SOAP and REST

apirestsoap

I'm implementing a mobile app that would communicate with Magento, there is a lot of functions/endpoints not implemented in SOAP or REST api, so im definitely going to extend whichever im going to consume. But the question is which should i use,

  1. The REST api apparently needs oAuth and end-user authroization, and from i understand there is no way to bypass this. But i dont want to do that, I just want to access the api and start firing request without the user authorization or prompting him with a dialog.
  2. From what i read the SOAP fits better with what im doing here, it just needs an api user and key.

Can you guys confirm this, should i go for the SOAP and extend it when needed.

Regards.

Best Answer

If this is purely read only data driven, You would be are better off push/polling Magento's API data into some data structure/DB to CDN and possibly cache locally. Scaling becomes a lot easier and your authentication problem isn't an obstacle anymore. But this purely depends on the requirements of the mobile app.

Magento has this authentication for a reason, as it exposes both Customer and Backend facing functionality. Someone could easily sniff out the URLs you are using and have lots of fun if there was no authentication. And for pete's sake use SSL! :)

In the end the purpose of the mobile app is what should be most considered.

To answer your question SOAP vs REST:

REST is most usually the answer.

Related Topic