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.