Creating your own API

Up to this point in this chapter, we've been using APIs provided by Salesforce. In effect, we're calling into Salesforce to retrieve or manipulate data. These APIs are well thought out, but they have their limitations. For instance, you can create, read, edit, and delete records, but you can only edit and delete individual records. Additionally, the tree creation endpoint, which allows you to create dependent, related objects in a single call, is only in pilot with the Winter '16 release. To help facilitate complex integrations, Salesforce has provided us with the ability to create our own RESTful endpoints, assigning HTTP actions to custom methods that accept custom payloads. We do this by writing custom Apex classes and ...

Get Mastering Application Development with Force.com now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.