简体   繁体   中英

Difference between Apex REST and REST API

谁能告诉我REST API和APEX REST之间的区别。我是REST概念的新手。对此我非常困惑。

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

Use the REST API most of the time. You can access your records and update them like you'd 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM