Path to Code
Begin Your Salesforce Coding Adventure
Episode 11
Building & Exposing REST APIs in Salesforce
• Enterprise Solutions Architect
• Global Community Speaker
Jigar Shah
@jigarshah189
Agenda
• REST Fundamentals
• Salesforce REST
• Need for Apex REST
• Understanding REST Annotations
• Building & Exposing Apex REST Services
• Apex REST Considerations
• Q&A
Some Housekeeping Rules…
• Mute your mic
• Keep adding questions in Zoom Q&A Window
• No questions are silly!
• Questions will be answered in the last 15 mins of this session
Decoding REST Fundamentals
Service
Provider
(Salesforce)
Service
Consumer
HTTP / HTTPS
1. Header
2. Body
1. Who?
2. What?
3. Where?
4. How?
REST
URI
1
2
4
3
Salesforce REST
Salesforce’s API first approach exposes features as RESTful Services also
termed as Salesforce REST
/services/data/v44.0/limits
/services/data/v44.0/sobjects/query?q=select+id+from+Account
/services/data/v44.0/sobjects/Account/0011U00000BgGjuQAF?fields=id,name
,type
Demo 1
Consuming Salesforce REST
Need for Apex REST
• Perform complex processing logic
• Return custom responses
• Bulk record manipulation
• Processing related objects
Understanding REST Annotations
Building Apex RESTful Services
https://yourInstance.salesforce.com/services/apexrest/<RestUrlMapping>
Demo 2
Building RESTful Services in Apex
Apex REST Considerations
• What can Apex REST receive and give back?
• Security context of Apex REST Services
• Including REST Services within Managed Packages
Resources
 Exposing Apex Classes as REST Web Services
 REST Controller Frameworks (Blog)
 Json2Apex
 cURL Download
Trailhead Modules
Lightning Platform API Basics Apex Web Services
Q & A
Thank You
Subscribe

Episode 11 building & exposing rest api in salesforce v1.0