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.
Apex REST Basic Code Sample
This sample shows how to implement a simple REST API in Apex with three HTTP request methods to delete, retrieve, and update a record.