Apex REST Code Samples
These code samples show you how to expose Apex classes and methods through the REST architecture and how to call those resources from a client.
-
This sample shows how to implement a simple REST API in Apex with three HTTP request methods to delete, retrieve, and update a record.
-
Apex REST Code Sample Using RestRequest
This sample shows you how to add an attachment to a record by using the RestRequest object.