Salesforce Certified Platform Developer II — Question 276

Which annotation exposes an Apex class as a RESTful web service?

Answer options

Correct answer: C

Explanation

The @RestResource annotation is specifically designed to expose Apex classes as RESTful web services, allowing external systems to interact with Salesforce data. The other options, such as @AuraEnabled, @HttpInvocable, and @RemoteAction, serve different purposes within Salesforce and do not provide RESTful service exposure.