Activity Forums Salesforce® Discussions What is RestResource Annotation means in salesforce ?

  • Prachi

    Member
    September 23, 2019 at 10:55 am

    Hi,

    The @RestResource annotation is used at the class level and enables you to expose an Apex class as a REST resource.

    These are some considerations when using this annotation:

    1.The URL mapping is relative to https://instance.salesforce.com/services/apexrest/.
    2.A wildcard character (*) may be used.
    3.The URL mapping is case-sensitive. A URL mapping for my_url will only match a REST resource containing my_url and not My_Url.
    4.To use this annotation, your Apex class must be defined as global.

    Thanks.

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos