I've found lots of questions and answers on REST API vs SOAP API.

Some of them like this one mention JSON.

Could you explain what is the difference between REST API vs JSON. (aka create custom module, controller and send JSON)

REST API can also output JSON, right? So why it's marked as separate category.

What is the difference in usage between both approaches. What are pros and cons. Please provide example if possible.

1 Answer 1


Magento framework API has built in:

  • authentication & permissions
  • error handling
  • you can call your existing models metods directly, no need to create more "special" controllers.

Creating own "json" API is like building your own car. Of course you can do it, but better, faster and cheaper is to use existing one ;)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.