Which of the following is NOT an annotation available for Apex REST methods?

Prepare for the Salesforce Integration Architect Test with multiple choice questions and in-depth explanations. Boost your confidence with comprehensive study resources and ace your exam!

The correct choice is D, as the @HttpInvoke annotation is not available for Apex REST methods in Salesforce. In Apex, REST methods are annotated with specific HTTP verb annotations that directly correspond to standard HTTP methods used in RESTful web services.

The annotations that are valid for Apex REST methods include @HttpGet, @HttpPost, @HttpPut, @HttpDelete, and @HttpPatch. Each of these annotations serves a specific purpose:

  • @HttpGet is used for retrieving data.

  • @HttpPost is for creating new records.

  • @HttpPut is intended for updating existing records.

  • @HttpDelete is used for removing records.

  • @HttpPatch is used for partially updating existing records.

Since @HttpInvoke does not exist in the available annotations for Apex REST methods, this option stands out as the one that does not belong, thereby making it the correct choice in identifying which annotation is not available.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy