Difference between Apex REST and REST API

Difference between Apex REST and REST API

The REST API (Force.com REST API) is the generic API provided by Salesforce. On the other hand, the Apex REST API is an API written by yourself in apex to provide custom methods.

The Force.com REST API is great for things such as CRUD operations. You should write a custom Apex REST API when you want to perform more complicated actions.

REST -> architectural style for distributed hypermedia systems.

APREX REST -> Apex REST enables you to implement custom Web services in Apex and expose them through the REST architecture.

Second is used to build RESTful web services

Difference between Apex REST and REST API

Use the REST API most of the time. You can access your records and update them like youd expect. But if you need to do something special, like update two records, and only have the changes saved if both updates were successful, then look at Apex REST, where you can customize what your API call does as much as you like.

More details in this interview: https://developer.salesforce.com/blogs/tech-pubs/2011/10/salesforce-apis-what-they-are-when-to-use-them.html

Leave a Reply

Your email address will not be published. Required fields are marked *